spec/csv2hash/structure_validator_spec.rb in csv2hash-0.6.6 vs spec/csv2hash/structure_validator_spec.rb in csv2hash-0.6.7
- old
+ new
@@ -8,10 +8,12 @@
mapping { cell position: [0,0], key: 'name' }
end.tap { |d| d.validate! ; d.default! }
end
subject do
- Main.new(definition, data_source, ignore_blank_line: false)
+ Main.new(definition, ignore_blank_line: false) do
+ data_source
+ end
end
context 'the csv with errors' do
before do
allow(definition).to receive(:structure_rules) {{ max_columns: 2 }}