diff options
author | danielsdeleo <dan@opscode.com> | 2013-02-27 11:50:13 -0800 |
---|---|---|
committer | danielsdeleo <dan@opscode.com> | 2013-02-27 11:50:13 -0800 |
commit | f67808e5502af6ceac1be7d8dedcd18eadb3b671 (patch) | |
tree | 140567a2c756a68afd64a070eee8458faded24e6 | |
parent | 43d01dcc6bfc44571d72a2e9bc4f32524f547ea7 (diff) | |
download | chef-f67808e5502af6ceac1be7d8dedcd18eadb3b671.tar.gz |
fix specs for rubygems < 2.0
-rw-r--r-- | lib/chef/provider/package/rubygems.rb | 2 | ||||
-rw-r--r-- | spec/unit/application_spec.rb | 4 |
2 files changed, 4 insertions, 2 deletions
diff --git a/lib/chef/provider/package/rubygems.rb b/lib/chef/provider/package/rubygems.rb index 5b47532597..b451450a8c 100644 --- a/lib/chef/provider/package/rubygems.rb +++ b/lib/chef/provider/package/rubygems.rb @@ -122,7 +122,7 @@ class Chef # code into Gem::Package. def spec_from_file(file) if defined?(Gem::Format) - Gem::Format.from_file_by_path(source).spec + Gem::Format.from_file_by_path(file).spec else Gem::Package.new(file).spec end diff --git a/spec/unit/application_spec.rb b/spec/unit/application_spec.rb index e0b0ab7568..4ec9112c4f 100644 --- a/spec/unit/application_spec.rb +++ b/spec/unit/application_spec.rb @@ -183,7 +183,9 @@ describe Chef::Application do it "should initialise the chef logger" do Chef::Log.stub!(:level=) - Chef::Log.should_receive(:init).with(Chef::Config[:log_location]).and_return(true) + @monologger = mock("Monologger") + MonoLogger.should_receive(:new).with(Chef::Config[:log_location]).and_return(@monologger) + Chef::Log.should_receive(:init).with(@monologger) @app.configure_logging end |