spec/generate_spec.rb in jsonify-0.2.0 vs spec/generate_spec.rb in jsonify-0.3.0

- old
+ new

@@ -11,11 +11,11 @@ end it 'should build json' do json = Jsonify::Generate result = json.value links expected = '{"links":[{"rel":"foo","href":"goo"},{"rel":"bar","href":"baz"}]}' - JSON.parse(result.to_json).should == JSON.parse(expected) + MultiJson.decode(result.encode_as_json).should == MultiJson.decode(expected) end describe 'complex example' do let(:jsonifier) { Jsonify::Generate } @@ -27,9 +27,9 @@ jsonifier.object_value( {"rel" => "bar", "href" => "baz"} ) ]) } ) expected = "{\"links\":[{\"rel\":\"foo\",\"href\":\"goo\"},{\"rel\":\"bar\",\"href\":\"baz\"}]}" - JSON.parse(json.to_json).should == JSON.parse(expected) + MultiJson.decode(json.encode_as_json).should == MultiJson.decode(expected) end end end \ No newline at end of file