summaryrefslogtreecommitdiffstats
path: root/spec/unit/node
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/node')
-rwxr-xr-xspec/unit/node/catalog.rb5
-rwxr-xr-xspec/unit/node/facts.rb8
2 files changed, 4 insertions, 9 deletions
diff --git a/spec/unit/node/catalog.rb b/spec/unit/node/catalog.rb
index f397b8706..59c70b45e 100755
--- a/spec/unit/node/catalog.rb
+++ b/spec/unit/node/catalog.rb
@@ -797,7 +797,7 @@ describe Puppet::Node::Catalog, " when indirecting" do
before do
@indirection = stub 'indirection', :name => :catalog
- Puppet::Indirector::Indirection.clear_cache
+ Puppet::Util::Cacher.invalidate
end
it "should redirect to the indirection for retrieval" do
@@ -811,8 +811,7 @@ describe Puppet::Node::Catalog, " when indirecting" do
end
after do
- mocha_verify
- Puppet::Indirector::Indirection.clear_cache
+ Puppet::Util::Cacher.invalidate
end
end
diff --git a/spec/unit/node/facts.rb b/spec/unit/node/facts.rb
index 1bfccd32e..69b8e4483 100755
--- a/spec/unit/node/facts.rb
+++ b/spec/unit/node/facts.rb
@@ -10,7 +10,8 @@ describe Puppet::Node::Facts, " when indirecting" do
# We have to clear the cache so that the facts ask for our indirection stub,
# instead of anything that might be cached.
- Puppet::Indirector::Indirection.clear_cache
+ Puppet::Util::Cacher.invalidate
+
@facts = Puppet::Node::Facts.new("me", "one" => "two")
end
@@ -29,11 +30,6 @@ describe Puppet::Node::Facts, " when indirecting" do
it "should default to the 'facter' terminus" do
Puppet::Node::Facts.indirection.terminus_class.should == :facter
end
-
- after do
- mocha_verify
- Puppet::Indirector::Indirection.clear_cache
- end
end
describe Puppet::Node::Facts, " when storing and retrieving" do