Sha256: 69b7b46719034865988071efbe55cc1df3c430fca1fca190c10bb53d07528a12

Contents?: true

Size: 579 Bytes

Versions: 3

Compression:

Stored size: 579 Bytes

Contents

require File.join(File.dirname(__FILE__),'../../spec_helper')

describe IMW::Formats::Csv do
  # we don't test Tsv as the differences from Csv are trivial and
  # effect only code within the FasterCSV library

  before do
    @sample = IMW.open(File.join(IMWTest::DATA_DIR, 'sample.csv'))
  end

  it "should be able to parse the CSV" do
    @sample.load[1].last.should == 'lemurinus'
  end

  it "should be able to write CSV" do
    data = [['foobar', 1, 2], ['bazbooz', 3, 4]]
    IMW.open!('test.csv').dump(data)
    IMW.open('test.csv').load[1].last.should == "4"
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
imw-0.2.7 spec/imw/formats/delimited_spec.rb
imw-0.2.6 spec/imw/formats/delimited_spec.rb
imw-0.2.5 spec/imw/formats/delimited_spec.rb