aboutsummaryrefslogtreecommitdiffstats
path: root/railties
diff options
context:
space:
mode:
authorUfuk Kayserilioglu <ufuk@paralaus.com>2019-02-10 17:44:07 +0200
committerGannon McGibbon <gannon.mcgibbon@gmail.com>2019-02-11 14:12:12 -0500
commitde96628c76f88e0cbd891f4342bb1b3277339831 (patch)
treee976987d774444a443e49fd49f7b02fb65bc0c9e /railties
parent325e917f5a5953e8125f4e6531ec28f0565954fd (diff)
downloadrails-de96628c76f88e0cbd891f4342bb1b3277339831.tar.gz
rails-de96628c76f88e0cbd891f4342bb1b3277339831.tar.bz2
rails-de96628c76f88e0cbd891f4342bb1b3277339831.zip
Fix assertion excpected/actual order
The assertion from the previous PR had the expected and the actual values in the wrong order, so when a test failed the error message was confusing. This commit fixes the problem by switching the order.
Diffstat (limited to 'railties')
-rw-r--r--railties/test/application/configuration_test.rb12
1 files changed, 6 insertions, 6 deletions
diff --git a/railties/test/application/configuration_test.rb b/railties/test/application/configuration_test.rb
index 1cafdedcdc..9ea4d6dc5f 100644
--- a/railties/test/application/configuration_test.rb
+++ b/railties/test/application/configuration_test.rb
@@ -1782,12 +1782,12 @@ module ApplicationTests
actual = Rails.application.config.my_custom_config
- assert_equal actual, foo: 0, bar: { baz: 1 }
- assert_equal actual.keys, [ :foo, :bar ]
- assert_equal actual.values, [ 0, baz: 1]
- assert_equal actual.to_h, foo: 0, bar: { baz: 1 }
- assert_equal actual[:foo], 0
- assert_equal actual[:bar], baz: 1
+ assert_equal({ foo: 0, bar: { baz: 1 } }, actual)
+ assert_equal([ :foo, :bar ], actual.keys)
+ assert_equal([ 0, baz: 1], actual.values)
+ assert_equal({ foo: 0, bar: { baz: 1 } }, actual.to_h)
+ assert_equal(0, actual[:foo])
+ assert_equal({ baz: 1 }, actual[:bar])
end
test "config_for generates deprecation notice when nested hash methods are called with non-symbols" do