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

Version Path
imw-0.2.18 spec/imw/formats/yaml_spec.rb
imw-0.2.17 spec/imw/formats/yaml_spec.rb
imw-0.2.16 spec/imw/formats/yaml_spec.rb
imw-0.2.15 spec/imw/formats/yaml_spec.rb
imw-0.2.14 spec/imw/formats/yaml_spec.rb
imw-0.2.13 spec/imw/formats/yaml_spec.rb
imw-0.2.12 spec/imw/formats/yaml_spec.rb
imw-0.2.11 spec/imw/formats/yaml_spec.rb
imw-0.2.10 spec/imw/formats/yaml_spec.rb
imw-0.2.9 spec/imw/formats/yaml_spec.rb
imw-0.2.8 spec/imw/formats/yaml_spec.rb