Permalink
Browse files

Fix json encoding test with ruby 1.8.7 and random hash order

Introduced in 3e53fe6.
  • Loading branch information...
1 parent 0ed585a commit 25b23d7ecc3a6c339fb580bd94dc5830ceb71b6f @carlosantoniodasilva carlosantoniodasilva committed Nov 13, 2012
Showing with 2 additions and 1 deletion.
  1. +2 −1 activesupport/test/json/encoding_test.rb
@@ -254,7 +254,8 @@ def test_to_json_should_not_keep_options_around
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

0 comments on commit 25b23d7

Please sign in to comment.