Sha256: 82408d0aef86a6e93981a4b8cb67194845cf07833a3c6dd954ad11a6ba00a911

Contents?: true

Size: 634 Bytes

Versions: 3

Compression:

Stored size: 634 Bytes

Contents

require 'spec_helper'

fixture_path = 'spec/fixtures'

describe 'be_able_to' do

  it 'loads_file_with_quoted_fields' do
    options = {}
    data = SmarterCSV.process("#{fixture_path}/quoted.csv", options)
    data.flatten.size.should == 4
    data[1][:model].should eq 'Venture "Extended Edition"'
    data[1][:description].should be_nil
    data[2][:model].should eq 'Venture "Extended Edition, Very Large"'
    data[2][:description].should be_nil
    data.each do |h|
      h[:year].class.should eq Fixnum
      h[:make].should_not be_nil
      h[:model].should_not be_nil
      h[:price].class.should eq Float
    end
  end

end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
smarter_csv-1.2.0 spec/smarter_csv/quoted_spec.rb
smarter_csv-1.1.5 spec/smarter_csv/quoted_spec.rb
smarter_csv-1.1.4 spec/smarter_csv/quoted_spec.rb