spec/parsing/active_support_spec.rb in brianmario-yajl-ruby-0.4.8 vs spec/parsing/active_support_spec.rb in brianmario-yajl-ruby-0.5.0
- old
+ new
@@ -35,16 +35,18 @@
}
TESTS.each do |json, expected|
it "should be able to parse #{json}" do
lambda {
- Yajl::Stream.parse(StringIO.new(json)).should == expected
+ parser = Yajl::Parser.new
+ parser.parse(StringIO.new(json)).should == expected
}.should_not raise_error(Yajl::ParseError)
end
end
it "should fail parsing {: 1}" do
lambda {
- Yajl::Stream.parse(StringIO.new("{: 1}"))
- }.should raise_error(Yajl::ParseError)
+ parser = Yajl::Parser.new
+ parser.parse(StringIO.new("{: 1}"))
+ }.should raise_error(Yajl::ParseError)
end
end