diff options
-rw-r--r-- | activesupport/test/json/encoding_test.rb | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/activesupport/test/json/encoding_test.rb b/activesupport/test/json/encoding_test.rb index 6cbf956be2..19881287b5 100644 --- a/activesupport/test/json/encoding_test.rb +++ b/activesupport/test/json/encoding_test.rb @@ -254,7 +254,8 @@ class TestJSONEncoding < Test::Unit::TestCase f.bar = "world" hash = {"foo" => f, "other_hash" => {"foo" => "other_foo", "test" => "other_test"}} - assert_equal(%({"foo":{"foo":"hello","bar":"world"},"other_hash":{"foo":"other_foo","test":"other_test"}}), hash.to_json) + assert_equal({ "foo" => { "foo" => "hello", "bar" => "world" }, "other_hash" => { "foo" => "other_foo", "test" => "other_test"} }, + JSON.parse(hash.to_json)) end def test_struct_encoding |