diff --git a/lib/foreman.rb b/lib/foreman.rb index a7d841e..77ef69c 100644 --- a/lib/foreman.rb +++ b/lib/foreman.rb @@ -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 diff --git a/spec/foreman_spec.rb b/spec/foreman_spec.rb index 9a66d12..ef1bbb3 100644 --- a/spec/foreman_spec.rb +++ b/spec/foreman_spec.rb @@ -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