Merge pull request #250 from szimek/249_multiline_strings

Handle multiline strings in .env file
This commit is contained in:
David Dollar
2012-09-14 01:34:10 -07:00
2 changed files with 11 additions and 1 deletions
+8
View File
@@ -90,6 +90,14 @@ describe "Foreman::Engine", :fakefs do
subject.env["OTHER"].should == 'escaped"quote'
end
it "should handle multiline strings" do
File.open("/tmp/env", "w") do |f|
f.puts 'FOO="bar\nbaz"'
end
subject.load_env "/tmp/env"
subject.env["FOO"].should == "bar\nbaz"
end
it "should fail if specified and doesnt exist" do
lambda { subject.load_env "/tmp/env" }.should raise_error(Errno::ENOENT)
end