diff options
author | James Turnbull <james@lovedthanlost.net> | 2008-07-08 08:54:59 +1000 |
---|---|---|
committer | James Turnbull <james@lovedthanlost.net> | 2008-07-08 08:54:59 +1000 |
commit | d899264b8aa250676f1d3f91d2df395741a6d22b (patch) | |
tree | 808417f12c123dff9647c50583e81ba8c5e4038f /spec | |
parent | 56525beb26d8371533a17667e6ebcae0cda9a6f6 (diff) | |
parent | 19b76c7910f1ee92ee00b7d746e5bc8f15ed59fe (diff) | |
download | puppet-d899264b8aa250676f1d3f91d2df395741a6d22b.tar.gz puppet-d899264b8aa250676f1d3f91d2df395741a6d22b.tar.xz puppet-d899264b8aa250676f1d3f91d2df395741a6d22b.zip |
Merge branch 'tickets/0.24.x/1401' of git://github.com/lak/puppet into 0.24.x
Diffstat (limited to 'spec')
-rwxr-xr-x | spec/integration/node.rb | 7 | ||||
-rwxr-xr-x | spec/integration/node/catalog.rb | 6 | ||||
-rwxr-xr-x | spec/integration/node/facts.rb | 6 |
3 files changed, 10 insertions, 9 deletions
diff --git a/spec/integration/node.rb b/spec/integration/node.rb index b0375e743..de95d0e79 100755 --- a/spec/integration/node.rb +++ b/spec/integration/node.rb @@ -31,10 +31,11 @@ describe Puppet::Node do Puppet::Node.indirection.stubs(:terminus_class).returns :yaml # Load now, before we stub the exists? method. - Puppet::Node.indirection.terminus(:yaml) + terminus = Puppet::Node.indirection.terminus(:yaml) - file = File.join(Puppet[:yamldir], "node", "me.yaml") - FileTest.expects(:exist?).with(file).returns false + terminus.expects(:path).with(@name).returns "/my/yaml/file" + + FileTest.expects(:exist?).with("/my/yaml/file").returns false Puppet::Node.find(@name).should be_nil end diff --git a/spec/integration/node/catalog.rb b/spec/integration/node/catalog.rb index 941d2cc6c..1fa2afbb0 100755 --- a/spec/integration/node/catalog.rb +++ b/spec/integration/node/catalog.rb @@ -19,10 +19,10 @@ describe Puppet::Node::Catalog do Puppet::Node::Catalog.indirection.stubs(:terminus_class).returns :yaml # Load now, before we stub the exists? method. - Puppet::Node::Catalog.indirection.terminus(:yaml) + terminus = Puppet::Node::Catalog.indirection.terminus(:yaml) + terminus.expects(:path).with("me").returns "/my/yaml/file" - file = File.join(Puppet[:yamldir], "catalog", "me.yaml") - FileTest.expects(:exist?).with(file).returns false + FileTest.expects(:exist?).with("/my/yaml/file").returns false Puppet::Node::Catalog.find("me").should be_nil end diff --git a/spec/integration/node/facts.rb b/spec/integration/node/facts.rb index c2f876578..a5d3e6964 100755 --- a/spec/integration/node/facts.rb +++ b/spec/integration/node/facts.rb @@ -24,10 +24,10 @@ describe Puppet::Node::Facts do Puppet::Node::Facts.indirection.stubs(:terminus_class).returns :yaml # Load now, before we stub the exists? method. - Puppet::Node::Facts.indirection.terminus(:yaml) + terminus = Puppet::Node::Facts.indirection.terminus(:yaml) - file = File.join(Puppet[:yamldir], "facts", "me.yaml") - FileTest.expects(:exist?).with(file).returns false + terminus.expects(:path).with("me").returns "/my/yaml/file" + FileTest.expects(:exist?).with("/my/yaml/file").returns false Puppet::Node::Facts.find("me").should be_nil end |