From f679933daa257a23095a6d7ad04aa2cbd3c7907e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Tue, 25 Sep 2018 13:18:20 -0400 Subject: Change the empty block style to have space inside of the block --- actionview/test/template/capture_helper_test.rb | 2 +- actionview/test/template/form_helper/form_with_test.rb | 16 ++++++++-------- actionview/test/template/form_helper_test.rb | 14 +++++++------- actionview/test/template/form_options_helper_test.rb | 2 +- actionview/test/template/test_case_test.rb | 2 +- 5 files changed, 18 insertions(+), 18 deletions(-) (limited to 'actionview/test/template') 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 -- cgit v1.2.3