summaryrefslogtreecommitdiffstats
path: root/spec/integration/node/facts.rb
diff options
context:
space:
mode:
authorMarkus Roberts <Markus@reality.com>2010-06-28 16:32:11 -0700
committerMarkus Roberts <Markus@reality.com>2010-06-28 16:32:11 -0700
commit9ceb4540a567b0a9de85af5397df4a292303a9c3 (patch)
tree30d1e1601888381baaaa14bfc5ee7246fd5c78e8 /spec/integration/node/facts.rb
parent85638cf427fe9b35d3e3b0fa4ce919c5806c60d3 (diff)
downloadpuppet-9ceb4540a567b0a9de85af5397df4a292303a9c3.tar.gz
puppet-9ceb4540a567b0a9de85af5397df4a292303a9c3.tar.xz
puppet-9ceb4540a567b0a9de85af5397df4a292303a9c3.zip
[#3994-part 2] rename integration tests to *_spec.rb
Some spec files like active_record.rb had names that would confuse the load path and get loaded instead of the intended implentation when the spec was run from the same directory as the file. Author: Matt Robinson <matt@puppetlabs.com> Date: Fri Jun 11 15:29:33 2010 -0700
Diffstat (limited to 'spec/integration/node/facts.rb')
-rwxr-xr-xspec/integration/node/facts.rb47
1 files changed, 0 insertions, 47 deletions
diff --git a/spec/integration/node/facts.rb b/spec/integration/node/facts.rb
deleted file mode 100755
index 0a4d21ed6..000000000
--- a/spec/integration/node/facts.rb
+++ /dev/null
@@ -1,47 +0,0 @@
-#!/usr/bin/env ruby
-#
-# Created by Luke Kanies on 2008-4-8.
-# Copyright (c) 2008. All rights reserved.
-
-require File.dirname(__FILE__) + '/../../spec_helper'
-
-describe Puppet::Node::Facts do
- describe "when using the indirector" do
- after { Puppet::Util::Cacher.expire }
-
- it "should expire any cached node instances when it is saved" do
- Puppet::Node::Facts.indirection.stubs(:terminus_class).returns :yaml
-
- Puppet::Node::Facts.indirection.terminus(:yaml).should equal(Puppet::Node::Facts.indirection.terminus(:yaml))
- terminus = Puppet::Node::Facts.indirection.terminus(:yaml)
- terminus.stubs :save
-
- Puppet::Node.expects(:expire).with("me")
-
- facts = Puppet::Node::Facts.new("me")
- facts.save
- end
-
- it "should be able to delegate to the :yaml terminus" do
- Puppet::Node::Facts.indirection.stubs(:terminus_class).returns :yaml
-
- # Load now, before we stub the exists? method.
- terminus = Puppet::Node::Facts.indirection.terminus(:yaml)
-
- 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
-
- it "should be able to delegate to the :facter terminus" do
- Puppet::Node::Facts.indirection.stubs(:terminus_class).returns :facter
-
- Facter.expects(:to_hash).returns "facter_hash"
- facts = Puppet::Node::Facts.new("me")
- Puppet::Node::Facts.expects(:new).with("me", "facter_hash").returns facts
-
- Puppet::Node::Facts.find("me").should equal(facts)
- end
- end
-end