summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xspec/integration/node_spec.rb3
-rwxr-xr-xspec/unit/application/apply_spec.rb10
-rwxr-xr-xspec/unit/node_spec.rb7
3 files changed, 12 insertions, 8 deletions
diff --git a/spec/integration/node_spec.rb b/spec/integration/node_spec.rb
index 4ea6142e2..b81a1fdc3 100755
--- a/spec/integration/node_spec.rb
+++ b/spec/integration/node_spec.rb
@@ -10,6 +10,9 @@ require 'puppet/node'
describe Puppet::Node do
describe "when delegating indirection calls" do
before do
+ Puppet::Node.indirection.reset_terminus_class
+ Puppet::Node.indirection.cache_class = nil
+
@name = "me"
@node = Puppet::Node.new(@name)
end
diff --git a/spec/unit/application/apply_spec.rb b/spec/unit/application/apply_spec.rb
index 489f4db36..c1f85d501 100755
--- a/spec/unit/application/apply_spec.rb
+++ b/spec/unit/application/apply_spec.rb
@@ -12,6 +12,14 @@ describe Puppet::Application::Apply do
Puppet::Util::Log.stubs(:newdestination)
end
+ after :each do
+ Puppet::Node::Facts.indirection.reset_terminus_class
+ Puppet::Node::Facts.indirection.cache_class = nil
+
+ Puppet::Node.indirection.reset_terminus_class
+ Puppet::Node.indirection.cache_class = nil
+ end
+
[:debug,:loadclasses,:verbose,:use_nodes,:detailed_exitcodes].each do |option|
it "should declare handle_#{option} method" do
@apply.should respond_to("handle_#{option}".to_sym)
@@ -48,7 +56,6 @@ describe Puppet::Application::Apply do
end
describe "during setup" do
-
before :each do
Puppet::Log.stubs(:newdestination)
Puppet.stubs(:parse_config)
@@ -111,7 +118,6 @@ describe Puppet::Application::Apply do
end
describe "when executing" do
-
it "should dispatch to 'apply' if it was called with 'apply'" do
@apply.options[:catalog] = "foo"
diff --git a/spec/unit/node_spec.rb b/spec/unit/node_spec.rb
index c15093d90..339054d55 100755
--- a/spec/unit/node_spec.rb
+++ b/spec/unit/node_spec.rb
@@ -130,14 +130,9 @@ end
describe Puppet::Node, "when indirecting" do
it "should default to the 'plain' node terminus" do
Puppet::Node.indirection.reset_terminus_class
- Puppet::Node.indirection.terminus_class.should == :plain
- end
- it "should not have a cache class defined" do
- Puppet::Node.indirection.cache_class.should be_nil
- end
+ Puppet::Node.indirection.terminus_class.should == :plain
- after do
Puppet::Util::Cacher.expire
end
end