aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/test/core_ext/object
diff options
context:
space:
mode:
authorRafael Mendonça França <rafaelmfranca@gmail.com>2016-08-16 04:30:11 -0300
committerRafael Mendonça França <rafaelmfranca@gmail.com>2016-08-16 04:30:11 -0300
commit55f9b8129a50206513264824abb44088230793c2 (patch)
treeff2f01cabfc7e74b0bd831c2272a5517e4e81e99 /activesupport/test/core_ext/object
parentd0bdd74d7f6fae3d69b3681d5bc2d5ef6f55a0f8 (diff)
downloadrails-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 'activesupport/test/core_ext/object')
-rw-r--r--activesupport/test/core_ext/object/instance_variables_test.rb2
-rw-r--r--activesupport/test/core_ext/object/to_query_test.rb8
2 files changed, 5 insertions, 5 deletions
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=",