Sha256: 25ac38da2ae6e6ac16087bdd1e4a67ce30fa521f923dfb219f8863732a57ca23
Contents?: true
Size: 445 Bytes
Versions: 3
Compression:
Stored size: 445 Bytes
Contents
require File.join(File.dirname(__FILE__),'../../spec_helper') describe IMW::Formats::Json do before do @sample = IMW.open(File.join(IMWTest::DATA_DIR, 'sample.json')) end it "should be able to parse the JSON" do @sample.load.first['id'].should == 1 end it "should be able to write JSON" do IMW.open!('test.json').dump({ 'foobar' => 3, 'bazbooz' => 4 }) IMW.open('test.json').load['foobar'].should == 3 end end
Version data entries
3 entries across 3 versions & 1 rubygems
Version | Path |
---|---|
imw-0.2.7 | spec/imw/formats/json_spec.rb |
imw-0.2.6 | spec/imw/formats/json_spec.rb |
imw-0.2.5 | spec/imw/formats/json_spec.rb |