spec/rbatch/config_spec.rb in rbatch-2.4.0 vs spec/rbatch/config_spec.rb in rbatch-2.5.0

- old
+ new

@@ -62,9 +62,20 @@ open( @path , "w" ){|f| f.write(":key: value")} expect { RBatch::Config.new(@path)["key"] }.to raise_error(RBatch::ConfigException) end + + it "read yaml format" do + open( @path , "w" ){|f| f.write("key: <%= \"hoge\" %>")} + expect(RBatch::Config.new(@path,false)["key"]).to eq "<%= \"hoge\" %>" + end + + it "read erb format" do + open( @path , "w" ){|f| f.write("key: <%= \"hoge\" %>" )} + expect(RBatch::Config.new(@path,true)["key"]).to eq "hoge" + end + end describe RBatch::ConfigElement do it "" do hash = {