csv: allow all Ruby csv parsing options

Closes #149

Generalization on PR #146 by Qgel. Thanks for the contribution!
This commit is contained in:
Andy Meneely
2016-03-24 02:23:47 -04:00
parent 080bd7e934
commit d7943da750
6 changed files with 49 additions and 2 deletions
+9
View File
@@ -67,6 +67,15 @@ describe Squib::Deck do
})
end
it 'loads custom CSV options' do
hash = Squib.csv(file: csv_file('custom_opts.csv'),
col_sep: '-', quote_char: '|')
expect(hash).to eq({
'x' => ['p'],
'y' => ['q-r']
})
end
end
context '#xlsx' do