diff options
author | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-11-13 09:17:36 -0200 |
---|---|---|
committer | Carlos Antonio da Silva <carlosantoniodasilva@gmail.com> | 2012-11-13 09:17:48 -0200 |
commit | 25b23d7ecc3a6c339fb580bd94dc5830ceb71b6f (patch) | |
tree | b3ab0b524b015d86dd85bd7b57525c1ea95c0098 | |
parent | 0ed585adeb10d11badc892702d01e3c7addccbf4 (diff) | |
download | rails-25b23d7ecc3a6c339fb580bd94dc5830ceb71b6f.tar.gz rails-25b23d7ecc3a6c339fb580bd94dc5830ceb71b6f.tar.bz2 rails-25b23d7ecc3a6c339fb580bd94dc5830ceb71b6f.zip |
Fix json encoding test with ruby 1.8.7 and random hash order
Introduced in 3e53fe6.
-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 |