From 25b23d7ecc3a6c339fb580bd94dc5830ceb71b6f Mon Sep 17 00:00:00 2001 From: Carlos Antonio da Silva Date: Tue, 13 Nov 2012 09:17:36 -0200 Subject: Fix json encoding test with ruby 1.8.7 and random hash order Introduced in 3e53fe6. --- activesupport/test/json/encoding_test.rb | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'activesupport') 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 -- cgit v1.2.3