load contents from env file

This commit is contained in:
Chris Continanza
2011-12-03 15:43:51 -08:00
parent 79cf541ebe
commit e33921f083
2 changed files with 19 additions and 0 deletions
+14
View File
@@ -8,4 +8,18 @@ describe Foreman do
it { should be_a String }
end
describe "::load!(env_file)" do
before do
File.open("/tmp/env1", "w") { |f| f.puts("FOO=bar") }
end
after do
ENV['FOO'] = nil
end
it "should load env_file into ENV" do
Foreman.load!("/tmp/env1")
ENV['FOO'].should == 'bar'
end
end
end