Sha256: c0ca4c924834c8394da592bfb9cc4f371c42aa6ab504e3931962eded8634dced

Contents?: true

Size: 456 Bytes

Versions: 3

Compression:

Stored size: 456 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, 'sample.yaml'))
  end

  it "should be able to parse the YAML" do
    @sample.first['id'].should == 1
  end

  it "should be able to write YAML" do
    data = { 'foobar' => 3, 'bazbooz' => 4 }
    IMW.open!('test.yaml').dump(data)
    IMW.open('test.yaml').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/yaml_spec.rb
imw-0.2.6 spec/imw/formats/yaml_spec.rb
imw-0.2.5 spec/imw/formats/yaml_spec.rb