diff options
author | Nick Lewis <nick@puppetlabs.com> | 2010-06-28 16:11:24 -0700 |
---|---|---|
committer | Nick Lewis <nick@puppetlabs.com> | 2010-06-28 16:11:24 -0700 |
commit | 2baf74e71d97f0e9917b088279cb0540e37c022c (patch) | |
tree | 36de06aab49735017766c0f8f37ce431072aa461 | |
parent | 2ab123f5a9ef045c0ea7acf109b5ea67fc9e5cf7 (diff) | |
download | puppet-2baf74e71d97f0e9917b088279cb0540e37c022c.tar.gz puppet-2baf74e71d97f0e9917b088279cb0540e37c022c.tar.xz puppet-2baf74e71d97f0e9917b088279cb0540e37c022c.zip |
maint: Fixes some noisy specs
This change removes some irrelevant output (debugging information,
warnings, etc) from a few specs.
-rwxr-xr-x | spec/unit/parser/scope_spec.rb | 4 | ||||
-rwxr-xr-x | spec/unit/util/logging_spec.rb | 2 | ||||
-rwxr-xr-x | spec/unit/util/settings_spec.rb | 4 |
3 files changed, 3 insertions, 7 deletions
diff --git a/spec/unit/parser/scope_spec.rb b/spec/unit/parser/scope_spec.rb index 37cf4bd8d..29dca38f4 100755 --- a/spec/unit/parser/scope_spec.rb +++ b/spec/unit/parser/scope_spec.rb @@ -63,7 +63,7 @@ describe Puppet::Parser::Scope do Puppet::Parser::Functions.expects(:environment_module).with(Puppet::Node::Environment.root).returns root_mod Puppet::Parser::Functions.expects(:environment_module).with(env).returns mod - Puppet::Parser::Scope.new(:compiler => compiler).metaclass.ancestors.should be_include(mod) + Puppet::Parser::Scope.new(:compiler => compiler).singleton_class.ancestors.should be_include(mod) end it "should extend itself with the default Functions module if it has no environment" do @@ -72,7 +72,7 @@ describe Puppet::Parser::Scope do Puppet::Parser::Functions.expects(:environment_module).with(nil).returns mod - Puppet::Parser::Scope.new().metaclass.ancestors.should be_include(mod) + Puppet::Parser::Scope.new().singleton_class.ancestors.should be_include(mod) end end diff --git a/spec/unit/util/logging_spec.rb b/spec/unit/util/logging_spec.rb index d6c38fd4c..aee308eca 100755 --- a/spec/unit/util/logging_spec.rb +++ b/spec/unit/util/logging_spec.rb @@ -76,7 +76,7 @@ describe Puppet::Util::Logging do [:file, :line, :version, :tags].each do |attr| it "should include #{attr} if available" do - @logger.metaclass.send(:attr_accessor, attr) + @logger.singleton_class.send(:attr_accessor, attr) @logger.send(attr.to_s + "=", "myval") diff --git a/spec/unit/util/settings_spec.rb b/spec/unit/util/settings_spec.rb index e36fd3fd9..3e70cb581 100755 --- a/spec/unit/util/settings_spec.rb +++ b/spec/unit/util/settings_spec.rb @@ -531,7 +531,6 @@ describe Puppet::Util::Settings do EventLoop::Timer.expects(:new).never @settings.parse - puts "2", @settings[:filetimeout] end end end @@ -680,8 +679,6 @@ describe Puppet::Util::Settings do @settings.setdefaults :other, :otherdir => [@prefix+"/otherdir", "a"] catalog = @settings.to_catalog - p "three dirs" - p catalog [@prefix+"/maindir", @prefix+"/seconddir", @prefix+"/otherdir"].each do |path| catalog.resource(:file, path).should be_instance_of(Puppet::Resource) @@ -692,7 +689,6 @@ describe Puppet::Util::Settings do @settings.setdefaults :main, :maindir => [@prefix+"/maindir", "a"] @settings.setdefaults :other, :otherdir => [@prefix+"/otherdir", "a"] catalog = @settings.to_catalog(:main) - p catalog catalog.resource(:file, @prefix+"/otherdir").should be_nil catalog.resource(:file, @prefix+"/maindir").should be_instance_of(Puppet::Resource) end |