diff options
-rw-r--r-- | lib/puppet/module.rb | 2 | ||||
-rwxr-xr-x | spec/unit/indirector/queue_spec.rb | 3 | ||||
-rwxr-xr-x | spec/unit/module_spec.rb | 4 | ||||
-rw-r--r-- | spec/unit/network/handler/fileserver_spec.rb | 2 | ||||
-rwxr-xr-x | spec/unit/parser/parser_spec.rb | 2 |
5 files changed, 8 insertions, 5 deletions
diff --git a/lib/puppet/module.rb b/lib/puppet/module.rb index 8da19c2ce..43266b2b5 100644 --- a/lib/puppet/module.rb +++ b/lib/puppet/module.rb @@ -191,7 +191,7 @@ class Puppet::Module def backward_compatible_plugins_dir if dir = File.join(path, "plugins") and FileTest.exist?(dir) - warning "using the deprecated 'plugins' directory for ruby extensions; please move to 'lib'" + Puppet.warning "using the deprecated 'plugins' directory for ruby extensions; please move to 'lib'" return dir else return File.join(path, "lib") diff --git a/spec/unit/indirector/queue_spec.rb b/spec/unit/indirector/queue_spec.rb index 00463ee0f..bbe00c75f 100755 --- a/spec/unit/indirector/queue_spec.rb +++ b/spec/unit/indirector/queue_spec.rb @@ -114,6 +114,9 @@ describe Puppet::Indirector::Queue, :if => Puppet.features.pson? do @store_class.client.expects(:subscribe).yields("foo") @store_class.expects(:intern).raises ArgumentError Puppet.expects(:err) + + @store_class.expects(:puts) + @store_class.subscribe {|o| o } end end diff --git a/spec/unit/module_spec.rb b/spec/unit/module_spec.rb index 37dad7e25..0b4873f5f 100755 --- a/spec/unit/module_spec.rb +++ b/spec/unit/module_spec.rb @@ -367,9 +367,9 @@ describe Puppet::Module do mod.stubs(:path).returns "/a/foo" FileTest.expects(:exist?).with("/a/foo/plugins").returns true - mod.expects(:warning) - mod.plugin_directory.should == "/a/foo/plugins" + @logs.first.message.should == "using the deprecated 'plugins' directory for ruby extensions; please move to 'lib'" + @logs.first.level.should == :warning end it "should default to 'lib' for the plugins directory" do diff --git a/spec/unit/network/handler/fileserver_spec.rb b/spec/unit/network/handler/fileserver_spec.rb index b37d4f551..9d34e9cdd 100644 --- a/spec/unit/network/handler/fileserver_spec.rb +++ b/spec/unit/network/handler/fileserver_spec.rb @@ -158,7 +158,7 @@ describe Puppet::Network::Handler::FileServer do end it "should not fail for inexistant plugins type" do - lambda { @mount.list("puppet/parser",true,false) }.should_not raise_error + @mount.list("puppet/parser",true,false) end end diff --git a/spec/unit/parser/parser_spec.rb b/spec/unit/parser/parser_spec.rb index 6cc393d91..2ed279fd9 100755 --- a/spec/unit/parser/parser_spec.rb +++ b/spec/unit/parser/parser_spec.rb @@ -259,7 +259,7 @@ describe Puppet::Parser do before do @lexer = stub 'lexer', :line => 50, :file => "/foo/bar", :getcomment => "whev" @parser.stubs(:lexer).returns @lexer - @class = stub 'class', :use_docs => false + @class = Puppet::Resource::Type.new(:hostclass, "myclass", :use_docs => false) end it "should return a new instance of the provided class created with the provided options" do |