aboutsummaryrefslogtreecommitdiffstats
path: root/actionview
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2018-09-25 13:18:20 -0400
committerRafael Mendonça França <rafaelmfranca@gmail.com>2018-09-25 13:19:35 -0400
commitf679933daa257a23095a6d7ad04aa2cbd3c7907e (patch)
treee1ebf6815655e7baa877da8738b715f29633f051 /actionview
parentd34bd0d2d55e33c757abd55fdd07ff575f68f185 (diff)
downloadrails-f679933daa257a23095a6d7ad04aa2cbd3c7907e.tar.gz
rails-f679933daa257a23095a6d7ad04aa2cbd3c7907e.tar.bz2
rails-f679933daa257a23095a6d7ad04aa2cbd3c7907e.zip
Change the empty block style to have space inside of the block
Diffstat (limited to 'actionview')
-rw-r--r--actionview/test/activerecord/debug_helper_test.rb2
-rw-r--r--actionview/test/template/capture_helper_test.rb2
-rw-r--r--actionview/test/template/form_helper/form_with_test.rb16
-rw-r--r--actionview/test/template/form_helper_test.rb14
-rw-r--r--actionview/test/template/form_options_helper_test.rb2
-rw-r--r--actionview/test/template/test_case_test.rb2
6 files changed, 19 insertions, 19 deletions
diff --git a/actionview/test/activerecord/debug_helper_test.rb b/actionview/test/activerecord/debug_helper_test.rb
index 4be1023733..87a1791573 100644
--- a/actionview/test/activerecord/debug_helper_test.rb
+++ b/actionview/test/activerecord/debug_helper_test.rb
@@ -13,7 +13,7 @@ class DebugHelperTest < ActionView::TestCase
end
def test_debug_with_marshal_error
- obj = -> {}
+ obj = -> { }
assert_match obj.inspect, Nokogiri.XML(debug(obj)).content
end
end
diff --git a/actionview/test/template/capture_helper_test.rb b/actionview/test/template/capture_helper_test.rb
index 131e49327e..3d96c81be9 100644
--- a/actionview/test/template/capture_helper_test.rb
+++ b/actionview/test/template/capture_helper_test.rb
@@ -219,7 +219,7 @@ class CaptureHelperTest < ActionView::TestCase
def test_with_output_buffer_does_not_assume_there_is_an_output_buffer
assert_nil @av.output_buffer
- assert_equal "", @av.with_output_buffer {}
+ assert_equal "", @av.with_output_buffer { }
end
def alt_encoding(output_buffer)
diff --git a/actionview/test/template/form_helper/form_with_test.rb b/actionview/test/template/form_helper/form_with_test.rb
index f38833f256..f84c9b2b73 100644
--- a/actionview/test/template/form_helper/form_with_test.rb
+++ b/actionview/test/template/form_helper/form_with_test.rb
@@ -2246,7 +2246,7 @@ class FormWithActsLikeFormForTest < FormWithTest
post.persisted = false
def post.to_key; nil; end
- form_with(model: post) {}
+ form_with(model: post) { }
expected = whole_form("/posts")
assert_dom_equal expected, output_buffer
@@ -2254,14 +2254,14 @@ class FormWithActsLikeFormForTest < FormWithTest
def test_form_with_with_existing_object_in_list
@comment.save
- form_with(model: [@post, @comment]) {}
+ form_with(model: [@post, @comment]) { }
expected = whole_form(post_comment_path(@post, @comment), method: "patch")
assert_dom_equal expected, output_buffer
end
def test_form_with_with_new_object_in_list
- form_with(model: [@post, @comment]) {}
+ form_with(model: [@post, @comment]) { }
expected = whole_form(post_comments_path(@post))
assert_dom_equal expected, output_buffer
@@ -2269,14 +2269,14 @@ class FormWithActsLikeFormForTest < FormWithTest
def test_form_with_with_existing_object_and_namespace_in_list
@comment.save
- form_with(model: [:admin, @post, @comment]) {}
+ form_with(model: [:admin, @post, @comment]) { }
expected = whole_form(admin_post_comment_path(@post, @comment), method: "patch")
assert_dom_equal expected, output_buffer
end
def test_form_with_with_new_object_and_namespace_in_list
- form_with(model: [:admin, @post, @comment]) {}
+ form_with(model: [:admin, @post, @comment]) { }
expected = whole_form(admin_post_comments_path(@post))
assert_dom_equal expected, output_buffer
@@ -2290,13 +2290,13 @@ class FormWithActsLikeFormForTest < FormWithTest
end
def test_form_with_with_default_method_as_patch
- form_with(model: @post) {}
+ form_with(model: @post) { }
expected = whole_form("/posts/123", method: "patch")
assert_dom_equal expected, output_buffer
end
def test_form_with_with_data_attributes
- form_with(model: @post, data: { behavior: "stuff" }) {}
+ form_with(model: @post, data: { behavior: "stuff" }) { }
assert_match %r|data-behavior="stuff"|, output_buffer
assert_match %r|data-remote="true"|, output_buffer
end
@@ -2315,7 +2315,7 @@ class FormWithActsLikeFormForTest < FormWithTest
end
end
- form_with(model: @post, builder: builder_class) {}
+ form_with(model: @post, builder: builder_class) { }
assert_equal 1, initialization_count, "form builder instantiated more than once"
end
diff --git a/actionview/test/template/form_helper_test.rb b/actionview/test/template/form_helper_test.rb
index 601fa6e8eb..5972946074 100644
--- a/actionview/test/template/form_helper_test.rb
+++ b/actionview/test/template/form_helper_test.rb
@@ -3488,14 +3488,14 @@ class FormHelperTest < ActionView::TestCase
def test_form_for_with_existing_object_in_list
@comment.save
- form_for([@post, @comment]) {}
+ form_for([@post, @comment]) { }
expected = whole_form(post_comment_path(@post, @comment), "edit_comment_1", "edit_comment", method: "patch")
assert_dom_equal expected, output_buffer
end
def test_form_for_with_new_object_in_list
- form_for([@post, @comment]) {}
+ form_for([@post, @comment]) { }
expected = whole_form(post_comments_path(@post), "new_comment", "new_comment")
assert_dom_equal expected, output_buffer
@@ -3503,14 +3503,14 @@ class FormHelperTest < ActionView::TestCase
def test_form_for_with_existing_object_and_namespace_in_list
@comment.save
- form_for([:admin, @post, @comment]) {}
+ form_for([:admin, @post, @comment]) { }
expected = whole_form(admin_post_comment_path(@post, @comment), "edit_comment_1", "edit_comment", method: "patch")
assert_dom_equal expected, output_buffer
end
def test_form_for_with_new_object_and_namespace_in_list
- form_for([:admin, @post, @comment]) {}
+ form_for([:admin, @post, @comment]) { }
expected = whole_form(admin_post_comments_path(@post), "new_comment", "new_comment")
assert_dom_equal expected, output_buffer
@@ -3524,13 +3524,13 @@ class FormHelperTest < ActionView::TestCase
end
def test_form_for_with_default_method_as_patch
- form_for(@post) {}
+ form_for(@post) { }
expected = whole_form("/posts/123", "edit_post_123", "edit_post", method: "patch")
assert_dom_equal expected, output_buffer
end
def test_form_for_with_data_attributes
- form_for(@post, data: { behavior: "stuff" }, remote: true) {}
+ form_for(@post, data: { behavior: "stuff" }, remote: true) { }
assert_match %r|data-behavior="stuff"|, output_buffer
assert_match %r|data-remote="true"|, output_buffer
end
@@ -3549,7 +3549,7 @@ class FormHelperTest < ActionView::TestCase
end
end
- form_for(@post, builder: builder_class) {}
+ form_for(@post, builder: builder_class) { }
assert_equal 1, initialization_count, "form builder instantiated more than once"
end
diff --git a/actionview/test/template/form_options_helper_test.rb b/actionview/test/template/form_options_helper_test.rb
index 8a0a706fef..a2d1474a94 100644
--- a/actionview/test/template/form_options_helper_test.rb
+++ b/actionview/test/template/form_options_helper_test.rb
@@ -668,7 +668,7 @@ class FormOptionsHelperTest < ActionView::TestCase
@post = Post.new
output_buffer = fields_for :post, @post do |f|
- concat(f.select(:category) {})
+ concat(f.select(:category) { })
end
assert_dom_equal(
diff --git a/actionview/test/template/test_case_test.rb b/actionview/test/template/test_case_test.rb
index 27f5a7cc3e..976b6bc77e 100644
--- a/actionview/test/template/test_case_test.rb
+++ b/actionview/test/template/test_case_test.rb
@@ -242,7 +242,7 @@ module ActionView
@routes ||= ActionDispatch::Routing::RouteSet.new
end
- routes.draw { get "bar", to: lambda {} }
+ routes.draw { get "bar", to: lambda { } }
def self.call(*)
end