diff options
Diffstat (limited to 'spec/unit/application_spec.rb')
-rw-r--r-- | spec/unit/application_spec.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/spec/unit/application_spec.rb b/spec/unit/application_spec.rb index 90e855e889..c73ebb2e21 100644 --- a/spec/unit/application_spec.rb +++ b/spec/unit/application_spec.rb @@ -85,6 +85,9 @@ describe Chef::Application do describe "configure_chef" do before do + # Silence warnings when no config file exists + Chef::Log.stub(:warn) + @app = Chef::Application.new #Chef::Config.stub(:merge!).and_return(true) @app.stub(:parse_options).and_return(true) @@ -108,6 +111,9 @@ describe Chef::Application do before do @app.config[:config_file] = config_location + + # force let binding to get evaluated or else we stub Pathname.new before we try to use it. + config_location_pathname Pathname.stub(:new).with(config_location).and_return(config_location_pathname) File.should_receive(:read). with(config_location). |