Sha256: 1e02eaae1c7cc301b940b8331d9be5eaaad39cf4a3d37a04314e7876a72d6caa
Contents?: true
Size: 584 Bytes
Versions: 33
Compression:
Stored size: 584 Bytes
Contents
require 'spec_helper' fixture_path = 'spec/fixtures' describe 'be_able_to' do it 'use_strings_as_keys' do options = {:strings_as_keys => true} 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 == String}} 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