diff options
author | danielsdeleo <dan@getchef.com> | 2014-04-22 21:11:34 -0700 |
---|---|---|
committer | danielsdeleo <dan@getchef.com> | 2014-04-24 09:49:52 -0700 |
commit | 03db320b200d13ba8980d7c104e955cf2ba7aa53 (patch) | |
tree | a3adf74f62ebe0050cfd38dbec3ddf56c1bf8c66 /spec/unit/application_spec.rb | |
parent | bfc0b5a5f5e7cc5255a2bc20b50cc2599ec4d7f6 (diff) | |
download | chef-03db320b200d13ba8980d7c104e955cf2ba7aa53.tar.gz |
Fix rspec warnings
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). |