rename load! to load_env!
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user