diff options
| author | James Turnbull <james@lovedthanlost.net> | 2009-04-06 11:45:23 +1000 |
|---|---|---|
| committer | James Turnbull <james@lovedthanlost.net> | 2009-04-06 11:45:23 +1000 |
| commit | 3aedfd8bbcefcdb92af57e4661a360be9aee2716 (patch) | |
| tree | f44e6bd75fca39f2fd6c87e5d0b6e84ee14dd8e0 /spec/unit/parser | |
| parent | 173b5f0a162d8dd7f72e1cab257069bc65382960 (diff) | |
| parent | a677e26eb1452c08d7724047a18e50f4a654d2cd (diff) | |
Merge branch 'master' of git://reductivelabs.com/puppet
Diffstat (limited to 'spec/unit/parser')
| -rw-r--r-- | spec/unit/parser/ast.rb | 6 | ||||
| -rwxr-xr-x | spec/unit/parser/resource.rb | 4 | ||||
| -rwxr-xr-x | spec/unit/parser/resource/reference.rb | 4 |
3 files changed, 13 insertions, 1 deletions
diff --git a/spec/unit/parser/ast.rb b/spec/unit/parser/ast.rb index 513943725..35e2b1eff 100644 --- a/spec/unit/parser/ast.rb +++ b/spec/unit/parser/ast.rb @@ -5,6 +5,10 @@ require File.dirname(__FILE__) + '/../../spec_helper' require 'puppet/parser/ast' describe Puppet::Parser::AST do + + it "should use the file lookup module" do + Puppet::Parser::AST.ancestors.should be_include(Puppet::FileCollection::Lookup) + end it "should have a doc accessor" do ast = Puppet::Parser::AST.new({}) @@ -34,4 +38,4 @@ describe Puppet::Parser::AST do end end -end
\ No newline at end of file +end diff --git a/spec/unit/parser/resource.rb b/spec/unit/parser/resource.rb index 92699e040..a042b4e72 100755 --- a/spec/unit/parser/resource.rb +++ b/spec/unit/parser/resource.rb @@ -44,6 +44,10 @@ describe Puppet::Parser::Resource do end end + it "should use the file lookup module" do + Puppet::Parser::Resource.ancestors.should be_include(Puppet::FileCollection::Lookup) + end + it "should be isomorphic if it is builtin and models an isomorphic type" do Puppet::Type.type(:file).expects(:isomorphic?).returns(true) @resource = Puppet::Parser::Resource.new(:type => "file", :title => "whatever", :scope => @scope, :source => @source).isomorphic?.should be_true diff --git a/spec/unit/parser/resource/reference.rb b/spec/unit/parser/resource/reference.rb index bb1452692..6284e67cc 100755 --- a/spec/unit/parser/resource/reference.rb +++ b/spec/unit/parser/resource/reference.rb @@ -7,6 +7,10 @@ describe Puppet::Parser::Resource::Reference do @type = Puppet::Parser::Resource::Reference end + it "should use the file lookup module" do + Puppet::Parser::Resource::Reference.ancestors.should be_include(Puppet::FileCollection::Lookup) + end + it "should require a type" do proc { @type.new(:title => "yay") }.should raise_error(Puppet::DevError) end |
