spec/csv2hash/yaml_loader_spec.rb in csv2hash-0.6.3 vs spec/csv2hash/yaml_loader_spec.rb in csv2hash-0.6.4
- old
+ new
@@ -1,20 +1,27 @@
require 'spec_helper'
module Csv2hash
describe YamlLoader do
- let(:config_file) { 'config/rules.yml' }
+ subject { YamlLoader.new config_file }
+ before { subject.load! }
- subject do
- YamlLoader.new config_file
- end
+ context 'yml' do
+ let(:config_file) { 'config/rules.erb.yml' }
- before do
- subject.load!
+ specify do
+ expect(subject.definition.name).to eql('example')
+ expect(subject.definition.header_size).to eql(2)
+ end
end
- specify do
- expect(subject.definition.name).to eql('example')
+ context 'erb' do
+ let(:config_file) { 'config/rules.yml' }
+
+ specify do
+ expect(subject.definition.name).to eql('example')
+ expect(subject.definition.header_size).to eql(2)
+ end
end
end
end