summaryrefslogtreecommitdiffstats
path: root/spec/unit/node/node.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/node/node.rb')
-rwxr-xr-xspec/unit/node/node.rb13
1 files changed, 7 insertions, 6 deletions
diff --git a/spec/unit/node/node.rb b/spec/unit/node/node.rb
index fe5d2be8b..06719c4cd 100755
--- a/spec/unit/node/node.rb
+++ b/spec/unit/node/node.rb
@@ -112,14 +112,15 @@ describe Puppet::Node, " when merging facts" do
end
describe Puppet::Node, " when indirecting" do
- before do
- @terminus = mock 'terminus'
- Puppet::Node.stubs(:indirection).returns(@terminus)
+ it "should redirect to the indirection" do
+ @indirection = mock 'indirection'
+ Puppet::Node.stubs(:indirection).returns(@indirection)
+ @indirection.expects(:find).with(:my_node.to_s)
+ Puppet::Node.find(:my_node.to_s)
end
- it "should redirect to the specified node source" do
- @terminus.expects(:find).with(:my_node.to_s)
- Puppet::Node.find(:my_node.to_s)
+ it "should default to the 'null' node terminus" do
+ Puppet::Node.indirection.terminus_class.should == :null
end
after do