spec/csv2hash/parser/mapping_spec.rb in csv2hash-0.0.2 vs spec/csv2hash/parser/mapping_spec.rb in csv2hash-0.1
- old
+ new
@@ -1,18 +1,16 @@
require 'spec_helper'
-describe Parser::Mapping do
+describe Csv2hash::Parser::Mapping do
let(:definition) do
- Definition.new [ { position: [0,0], key: 'name' } ], Definition::MAPPING
+ Csv2hash::Definition.new [ { position: [0,0], key: 'name' } ], Csv2hash::Definition::MAPPING
end
let(:data_source) { [ [ 'John Doe' ] ] }
subject do
- Csv2hash.new(definition, 'file_path').tap do |csv2hash|
- csv2hash.data_source = data_source
- end
+ Csv2hash.new(definition, 'file_path', false, data_source)
end
context 'regular way' do
it { expect { subject.parse }.to_not raise_error }
it {
\ No newline at end of file