Sha256: ae3dbe4d2ded176e547610012805244227d0c219120ba3d1b586b2358820ba54
Contents?: true
Size: 776 Bytes
Versions: 19
Compression:
Stored size: 776 Bytes
Contents
require 'spec_helper' fixture_path = 'spec/fixtures' # somebody reported that a column called 'options_trader' would be truncated to 'trader' describe 'loads simple file format' do it 'with symbols as keys when using defaults' do options = {} data = SmarterCSV.process("#{fixture_path}/trading.csv", options) data.flatten.size.should eq 2 data.each do |item| # all keys should be symbols when using v1.x backwards compatible mode item.keys.each{|x| x.class.should eq Symbol} item[:account_id].class.should eq Fixnum item[:options_trader].class.should eq String item[:stock_symbol].class.should eq String item[:shares_issued].class.should eq Fixnum item[:purchase_date].class.should eq String end end end
Version data entries
19 entries across 19 versions & 2 rubygems