From 55f9b8129a50206513264824abb44088230793c2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rafael=20Mendon=C3=A7a=20Fran=C3=A7a?= Date: Tue, 16 Aug 2016 04:30:11 -0300 Subject: Add three new rubocop rules Style/SpaceBeforeBlockBraces Style/SpaceInsideBlockBraces Style/SpaceInsideHashLiteralBraces Fix all violations in the repository. --- activesupport/test/core_ext/object/instance_variables_test.rb | 2 +- activesupport/test/core_ext/object/to_query_test.rb | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'activesupport/test/core_ext/object') diff --git a/activesupport/test/core_ext/object/instance_variables_test.rb b/activesupport/test/core_ext/object/instance_variables_test.rb index 510352595a..5bdb2fbc35 100644 --- a/activesupport/test/core_ext/object/instance_variables_test.rb +++ b/activesupport/test/core_ext/object/instance_variables_test.rb @@ -13,7 +13,7 @@ class ObjectInstanceVariableTest < ActiveSupport::TestCase end def test_instance_values - assert_equal({"bar" => "bar", "baz" => "baz"}, @source.instance_values) + assert_equal({ "bar" => "bar", "baz" => "baz" }, @source.instance_values) end def test_instance_exec_passes_arguments_to_block diff --git a/activesupport/test/core_ext/object/to_query_test.rb b/activesupport/test/core_ext/object/to_query_test.rb index 2eff475274..298c8bf373 100644 --- a/activesupport/test/core_ext/object/to_query_test.rb +++ b/activesupport/test/core_ext/object/to_query_test.rb @@ -33,17 +33,17 @@ class ToQueryTest < ActiveSupport::TestCase def test_multiple_nested assert_query_equal "account%5Bperson%5D%5Bid%5D=20&person%5Bid%5D=10", - Hash[:account, {person: {id: 20}}, :person, {id: 10}] + Hash[:account, { person: { id: 20 } }, :person, { id: 10 }] end def test_array_values assert_query_equal "person%5Bid%5D%5B%5D=10&person%5Bid%5D%5B%5D=20", - person: {id: [10, 20]} + person: { id: [10, 20] } end def test_array_values_are_not_sorted assert_query_equal "person%5Bid%5D%5B%5D=20&person%5Bid%5D%5B%5D=10", - person: {id: [20, 10]} + person: { id: [20, 10] } end def test_empty_array @@ -56,7 +56,7 @@ class ToQueryTest < ActiveSupport::TestCase assert_query_equal "a=1&b%5Bc%5D=3", a: 1, b: { c: 3, d: {} } assert_query_equal "", - a: {b: {c: {}}} + a: { b: { c: {} } } assert_query_equal "b%5Bc%5D=false&b%5Be%5D=&b%5Bf%5D=&p=12", p: 12, b: { c: false, e: nil, f: "" } assert_query_equal "b%5Bc%5D=3&b%5Bf%5D=", -- cgit v1.2.3