summaryrefslogtreecommitdiffstats
path: root/spec/unit/node
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2007-10-05 11:36:27 -0500
committerLuke Kanies <luke@madstop.com>2007-10-05 11:36:27 -0500
commitd35cd947c82ba9da8ec798100a3c710c34492521 (patch)
tree1feb494a3d88c2eab819265beb39827511948e54 /spec/unit/node
parent0e336bf62b818aaa31fcc323ab5d31e5eb92eb46 (diff)
downloadpuppet-d35cd947c82ba9da8ec798100a3c710c34492521.tar.gz
puppet-d35cd947c82ba9da8ec798100a3c710c34492521.tar.xz
puppet-d35cd947c82ba9da8ec798100a3c710c34492521.zip
Making "null" the default node source, so nodes are at least created easily
Diffstat (limited to 'spec/unit/node')
-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