Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix json encoding test with ruby 1.8.7 and random hash order

Introduced in 3e53fe6.
  • Loading branch information...
commit 25b23d7ecc3a6c339fb580bd94dc5830ceb71b6f 1 parent 0ed585a
@carlosantoniodasilva carlosantoniodasilva authored
Showing with 2 additions and 1 deletion.
  1. +2 −1  activesupport/test/json/encoding_test.rb
View
3  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
Please sign in to comment.
Something went wrong with that request. Please try again.