Sha256: 3490091b67cf40516ec20034194550a83e72e790cb7e37284303444a0b484c49

Contents?: true

Size: 492 Bytes

Versions: 33

Compression:

Stored size: 492 Bytes

Contents

require 'spec_helper'

fixture_path = 'spec/fixtures'

describe 'be_able_to' do
  it 'loads_basic_csv_file' do 
    data = SmarterCSV.process("#{fixture_path}/basic.csv")
    data.size.should == 5

    # all the keys should be symbols
    data.each{|item| item.keys.each{|x| x.class.should be == Symbol}}
    data.each do |h|
      h.keys.each do |key|
        [:first_name, :last_name, :dogs, :cats, :birds, :fish].should include( key )
      end
      h.size.should <= 6
    end
  end

end

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
smarter_csv-1.1.5 spec/smarter_csv/load_basic_spec.rb
smarter_csv-1.1.4 spec/smarter_csv/load_basic_spec.rb
smarter_csv-1.1.3 spec/smarter_csv/load_basic_spec.rb
smarter_csv-1.1.2 spec/smarter_csv/load_basic_spec.rb
smarter_csv-1.1.1 spec/smarter_csv/load_basic_spec.rb
smarter_csv-1.1.0 spec/smarter_csv/load_basic_spec.rb
smarter_csv-1.0.19 spec/smarter_csv/load_basic_spec.rb
smarter_csv-1.0.18 spec/smarter_csv/load_basic_spec.rb
smarter_csv-1.0.17 spec/smarter_csv/load_basic_spec.rb
smarter_csv-1.0.16 spec/smarter_csv/load_basic_spec.rb
smarter_csv-1.0.15 spec/smarter_csv/load_basic_spec.rb
smarter_csv-1.0.14 spec/smarter_csv/load_basic_spec.rb
smarter_csv-1.0.12 spec/smarter_csv/load_basic_spec.rb