Sha256: 78470064c6aa3cf96eeaa72ded0c009bbcf04c365bc13d4188da6d659c8a0e3d
Contents?: true
Size: 498 Bytes
Versions: 11
Compression:
Stored size: 498 Bytes
Contents
require File.join(File.dirname(__FILE__),'../../spec_helper') describe IMW::Formats::Yaml do before do @sample = IMW.open(File.join(IMWTest::DATA_DIR, 'formats/yaml/sample.yaml')).load end it "should be able to parse the YAML" do @sample['Lophocebus'].first[:id].should == 94 end it "should be able to write YAML" do data = { 'foobar' => 3, 'bazbooz' => 4 } IMW.open!('test.yaml') { |f| f.emit(data) } IMW.open('test.yaml').load['foobar'].should == 3 end end
Version data entries
11 entries across 11 versions & 1 rubygems