spec/merb-assets_spec.rb in merb-assets-1.0.12 vs spec/merb-assets_spec.rb in merb-assets-1.0.13

- old
+ new

@@ -71,11 +71,11 @@ escape_js("Please keep text\nlines as skinny\nas possible.").should == "Please keep text\\nlines as skinny\\nas possible." end it "should convert objects that respond to to_json to json" do - js({'user' => 'Lewis', 'page' => 'home'}).should == - "{\"user\":\"Lewis\",\"page\":\"home\"}" + expected = {'user' => 'Lewis', 'page' => 'home'} + JSON.parse(js(expected)).should == expected end it "should convert objects using inspect that don't respond to_json to json" do js([ 1, 2, {"a"=>3.141}, false, true, nil, 4..10 ]).should == "[1,2,{\"a\":3.141},false,true,null,\"4..10\"]"