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

« back to all changes in this revision

Viewing changes to spec/unit/parser/ast/node.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:
12
12
        @scope = @compiler.topscope
13
13
    end
14
14
 
 
15
    describe "when calling get_classname" do
 
16
        it "should return current node name if name is a Regex" do
 
17
            name = stub 'name', :regex? => true
 
18
            node = @parser.newnode("node").shift
 
19
            node.stubs(:name).returns(name)
 
20
 
 
21
            @scope.expects(:host).returns("testnode")
 
22
 
 
23
            node.get_classname(@scope).should == "testnode"
 
24
        end
 
25
 
 
26
        it "should return the current node classname if name is not a Regex" do
 
27
            name = stub 'name', :regex? => false
 
28
            node = @parser.newnode("node").shift
 
29
            node.stubs(:name).returns(name)
 
30
 
 
31
            node.get_classname(@scope).should == "node"
 
32
        end
 
33
    end
 
34
 
15
35
    describe Puppet::Parser::AST::Node, "when evaluating" do
16
36
 
17
37
        before do