summaryrefslogtreecommitdiffstats
path: root/spec/unit/parser
diff options
context:
space:
mode:
authorJames Turnbull <james@lovedthanlost.net>2009-04-06 11:45:23 +1000
committerJames Turnbull <james@lovedthanlost.net>2009-04-06 11:45:23 +1000
commit3aedfd8bbcefcdb92af57e4661a360be9aee2716 (patch)
treef44e6bd75fca39f2fd6c87e5d0b6e84ee14dd8e0 /spec/unit/parser
parent173b5f0a162d8dd7f72e1cab257069bc65382960 (diff)
parenta677e26eb1452c08d7724047a18e50f4a654d2cd (diff)
Merge branch 'master' of git://reductivelabs.com/puppet
Diffstat (limited to 'spec/unit/parser')
-rw-r--r--spec/unit/parser/ast.rb6
-rwxr-xr-xspec/unit/parser/resource.rb4
-rwxr-xr-xspec/unit/parser/resource/reference.rb4
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