~ubuntu-branches/ubuntu/lucid/puppet/lucid-security

« back to all changes in this revision

Viewing changes to spec/integration/node/facts.rb

  • Committer: Bazaar Package Importer
  • Author(s): Chuck Short
  • Date: 2009-12-23 00:48:10 UTC
  • mfrom: (1.1.10 upstream) (3.1.7 squeeze)
  • Revision ID: james.westby@ubuntu.com-20091223004810-3i4oryds922g5n59
Tags: 0.25.1-3ubuntu1
* Merge from debian testing.  Remaining changes:
  - debian/rules:
    + Don't start puppet when first installing puppet.
  - debian/puppet.conf, lib/puppet/defaults.rb:
    + Move templates to /etc/puppet
  - lib/puppet/defaults.rb:
    + Fix /var/lib/puppet/state ownership.
  - man/man8/puppet.conf.8: 
    + Fix broken URL in manpage.
  - debian/control:
    + Update maintainer accordint to spec.
    + Puppetmaster Recommends -> Suggests
    + Created puppet-testsuite as a seperate. Allow the users to run puppet's 
      testsuite.
  - tests/Rakefile: Fix rakefile so that the testsuite can acutally be ran.

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
 
8
8
describe Puppet::Node::Facts do
9
9
    describe "when using the indirector" do
10
 
        after { Puppet::Node::Facts.indirection.clear_cache }
 
10
        after { Puppet::Util::Cacher.expire }
11
11
 
12
12
        it "should expire any cached node instances when it is saved" do
13
13
            Puppet::Node::Facts.indirection.stubs(:terminus_class).returns :yaml
 
14
 
 
15
            Puppet::Node::Facts.indirection.terminus(:yaml).should equal(Puppet::Node::Facts.indirection.terminus(:yaml))
14
16
            terminus = Puppet::Node::Facts.indirection.terminus(:yaml)
 
17
            terminus.stubs :save
15
18
 
16
 
            terminus.expects(:save)
17
19
            Puppet::Node.expects(:expire).with("me")
18
20
 
19
21
            facts = Puppet::Node::Facts.new("me")