diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-08-16 04:30:11 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2016-08-16 04:30:11 -0300 |
commit | 55f9b8129a50206513264824abb44088230793c2 (patch) | |
tree | ff2f01cabfc7e74b0bd831c2272a5517e4e81e99 /actionpack/test/controller/mime | |
parent | d0bdd74d7f6fae3d69b3681d5bc2d5ef6f55a0f8 (diff) | |
download | rails-55f9b8129a50206513264824abb44088230793c2.tar.gz rails-55f9b8129a50206513264824abb44088230793c2.tar.bz2 rails-55f9b8129a50206513264824abb44088230793c2.zip |
Add three new rubocop rules
Style/SpaceBeforeBlockBraces
Style/SpaceInsideBlockBraces
Style/SpaceInsideHashLiteralBraces
Fix all violations in the repository.
Diffstat (limited to 'actionpack/test/controller/mime')
-rw-r--r-- | actionpack/test/controller/mime/respond_to_test.rb | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/actionpack/test/controller/mime/respond_to_test.rb b/actionpack/test/controller/mime/respond_to_test.rb index 2b6d319999..c5f8165d04 100644 --- a/actionpack/test/controller/mime/respond_to_test.rb +++ b/actionpack/test/controller/mime/respond_to_test.rb @@ -76,7 +76,7 @@ class RespondToController < ActionController::Base def missing_templates respond_to do |type| # This test requires a block that is empty - type.json { } + type.json {} type.xml end end @@ -221,7 +221,7 @@ class RespondToController < ActionController::Base def variant_any respond_to do |format| format.html do |variant| - variant.any(:tablet, :phablet){ render body: "any" } + variant.any(:tablet, :phablet) { render body: "any" } variant.phone { render body: "phone" } end end @@ -238,7 +238,7 @@ class RespondToController < ActionController::Base def variant_inline_any respond_to do |format| - format.html.any(:tablet, :phablet){ render body: "any" } + format.html.any(:tablet, :phablet) { render body: "any" } format.html.phone { render body: "phone" } end end @@ -259,7 +259,7 @@ class RespondToController < ActionController::Base def variant_any_with_none respond_to do |format| - format.html.any(:none, :phone){ render body: "none or phone" } + format.html.any(:none, :phone) { render body: "none or phone" } end end @@ -267,8 +267,8 @@ class RespondToController < ActionController::Base respond_to do |format| format.html { render body: "HTML" } format.any(:js, :xml) do |variant| - variant.phone{ render body: "phone" } - variant.any(:tablet, :phablet){ render body: "tablet" } + variant.phone { render body: "phone" } + variant.any(:tablet, :phablet) { render body: "tablet" } end end end @@ -674,7 +674,7 @@ class RespondToControllerTest < ActionController::TestCase get :variant_without_implicit_template_rendering, xhr: true, params: { v: :does_not_matter } assert_response :no_content - assert_equal 1, logger.logged(:info).select{ |s| s == NO_CONTENT_WARNING }.size, "Implicit head :no_content not logged" + assert_equal 1, logger.logged(:info).select { |s| s == NO_CONTENT_WARNING }.size, "Implicit head :no_content not logged" ensure ActionController::Base.logger = old_logger end @@ -686,7 +686,7 @@ class RespondToControllerTest < ActionController::TestCase get :variant_without_implicit_template_rendering, format: "json", params: { v: :does_not_matter } assert_response :no_content - assert_equal 1, logger.logged(:info).select{ |s| s == NO_CONTENT_WARNING }.size, "Implicit head :no_content not logged" + assert_equal 1, logger.logged(:info).select { |s| s == NO_CONTENT_WARNING }.size, "Implicit head :no_content not logged" ensure ActionController::Base.logger = old_logger end |