rename load! to load_env!

This commit is contained in:
Chris Continanza
2011-12-05 12:27:28 -08:00
parent 44a5dff724
commit 58e4cdafd7
2 changed files with 4 additions and 4 deletions

View File

@@ -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

View File

@@ -8,7 +8,7 @@ describe Foreman do
it { should be_a String }
end
describe "::load!(env_file)" do
describe "::load_env!(env_file)" do
before do
FakeFS.activate!
end
@@ -20,13 +20,13 @@ describe Foreman do
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