Sha256: 4aa716980b152bb2d13d1bb88289caa1b99f966089b61e8e35b3180c614f0ae6

Contents?: true

Size: 580 Bytes

Versions: 33

Compression:

Stored size: 580 Bytes

Contents

require 'spec_helper'

fixture_path = 'spec/fixtures'

describe 'be_able_to' do
  it 'not_downcase_headers' do 
    options = {:downcase_header => false}
    data = SmarterCSV.process("#{fixture_path}/basic.csv", options)
    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 |item| 
      item.keys.each do |key|
        [:First_Name, :Last_Name, :Dogs, :Cats, :Birds, :Fish].should include( key )
      end
    end

    data.each do |h|
      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/not_downcase_header_spec.rb
smarter_csv-1.1.4 spec/smarter_csv/not_downcase_header_spec.rb
smarter_csv-1.1.3 spec/smarter_csv/not_downcase_header_spec.rb
smarter_csv-1.1.2 spec/smarter_csv/not_downcase_header_spec.rb
smarter_csv-1.1.1 spec/smarter_csv/not_downcase_header_spec.rb
smarter_csv-1.1.0 spec/smarter_csv/not_downcase_header_spec.rb
smarter_csv-1.0.19 spec/smarter_csv/not_downcase_header_spec.rb
smarter_csv-1.0.18 spec/smarter_csv/not_downcase_header_spec.rb
smarter_csv-1.0.17 spec/smarter_csv/not_downcase_header_spec.rb
smarter_csv-1.0.16 spec/smarter_csv/not_downcase_header_spec.rb
smarter_csv-1.0.15 spec/smarter_csv/not_downcase_header_spec.rb
smarter_csv-1.0.14 spec/smarter_csv/not_downcase_header_spec.rb
smarter_csv-1.0.12 spec/smarter_csv/not_downcase_header_spec.rb