Skip to content

Commit

Permalink
rename load! to load_env!
Browse files Browse the repository at this point in the history
  • Loading branch information
csquared committed Dec 5, 2011
1 parent 44a5dff commit 58e4cda
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion lib/foreman.rb
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ module Foreman
class AppDoesNotExist < Exception; end

# load contents of env_file into ENV
def self.load!(env_file = './.env')
def self.load_env!(env_file = './.env')
require 'foreman/engine'
Foreman::Engine.load_env(env_file)
end
Expand Down
6 changes: 3 additions & 3 deletions spec/foreman_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
it { should be_a String }
end

describe "::load!(env_file)" do
describe "::load_env!(env_file)" do
before do
FakeFS.activate!
end
Expand All @@ -20,13 +20,13 @@

it "should load env_file into ENV" do
File.open("/tmp/env1", "w") { |f| f.puts("FOO=bar") }
Foreman.load!("/tmp/env1")
Foreman.load_env!("/tmp/env1")
ENV['FOO'].should == 'bar'
end

it "should assume env_file in ./.env" do
File.open("./.env", "w") { |f| f.puts("FOO=bar") }
Foreman.load!
Foreman.load_env!
ENV['FOO'].should == 'bar'
end
end
Expand Down

0 comments on commit 58e4cda

Please sign in to comment.