aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-13 09:17:36 -0200
committerCarlos Antonio da Silva <carlosantoniodasilva@gmail.com>2012-11-13 09:17:48 -0200
commit25b23d7ecc3a6c339fb580bd94dc5830ceb71b6f (patch)
treeb3ab0b524b015d86dd85bd7b57525c1ea95c0098
parent0ed585adeb10d11badc892702d01e3c7addccbf4 (diff)
downloadrails-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.rb3
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