spec/csv2hash/definition_spec.rb in csv2hash-0.2.1 vs spec/csv2hash/definition_spec.rb in csv2hash-0.3.0
- old
+ new
@@ -10,12 +10,12 @@
Csv2hash::Definition::MAPPING
)
end
it 'variable should be assigned' do
- subject.type.should eql Csv2hash::Definition::MAPPING
- subject.rules.should eql [ { position: [0,0], key: 'name' } ]
+ expect(subject.type).to eql Csv2hash::Definition::MAPPING
+ expect(subject.rules).to eql [ { position: [0,0], key: 'name' } ]
end
end
describe '#validate!' do
context 'rules failling validation' do
@@ -54,11 +54,11 @@
end
before { subject.default! }
it 'missing key must be filled' do
- subject.rules.should eql([{ position: [0, 0],
+ expect(subject.rules).to eql([{ position: [0, 0],
key: 'name',
message: 'undefined :key on :position',
mappable: true,
type: 'string',
values: nil,
@@ -66,9 +66,5 @@
allow_blank: false,
extra_validator: nil }])
end
end
end
-
-
-
-