Sha256: 25451fe18297e482b8ca3c96cc58e7a82cdf83f8b1e3296a9cb60d09f523e4d3
Contents?: true
Size: 594 Bytes
Versions: 33
Compression:
Stored size: 594 Bytes
Contents
require 'spec_helper' fixture_path = 'spec/fixtures' describe 'be_able_to' do it 'strip_whitespace_from_headers' do options = {:strip_chars_from_headers => ' '} 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| [:firstname, :lastname, :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