summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLuke Kanies <luke@madstop.com>2008-11-07 16:59:13 -0600
committerLuke Kanies <luke@madstop.com>2008-11-07 16:59:13 -0600
commiteed37f7133a33577d1ebc8441db6090fb4c0b7f8 (patch)
tree92f535c09e6b599a4050ebd3470c8a51a756743a
parent45c6382e99c3e4c4c9bc85fef35a4114b1d1fb46 (diff)
downloadpuppet-eed37f7133a33577d1ebc8441db6090fb4c0b7f8.tar.gz
puppet-eed37f7133a33577d1ebc8441db6090fb4c0b7f8.tar.xz
puppet-eed37f7133a33577d1ebc8441db6090fb4c0b7f8.zip
Fixing a test broken by previous refactoring
Signed-off-by: Luke Kanies <luke@madstop.com>
-rwxr-xr-xspec/unit/parser/compiler.rb11
1 files changed, 4 insertions, 7 deletions
diff --git a/spec/unit/parser/compiler.rb b/spec/unit/parser/compiler.rb
index ab430da62..c70fe8e13 100755
--- a/spec/unit/parser/compiler.rb
+++ b/spec/unit/parser/compiler.rb
@@ -218,14 +218,11 @@ describe Puppet::Parser::Compiler do
end
it "should fail to add resources that conflict with existing resources" do
- type = stub 'faketype', :isomorphic? => true, :name => "mytype"
- Puppet::Type.stubs(:type).with("mytype").returns(type)
+ file1 = Puppet::Type.type(:file).create :path => "/foo"
+ file2 = Puppet::Type.type(:file).create :path => "/foo"
- resource1 = stub "iso1conflict", :ref => "Mytype[yay]", :type => "mytype", :file => "eh", :line => 0
- resource2 = stub "iso2conflict", :ref => "Mytype[yay]", :type => "mytype", :file => "eh", :line => 0
-
- @compiler.add_resource(@scope, resource1)
- lambda { @compiler.add_resource(@scope, resource2) }.should raise_error(ArgumentError)
+ @compiler.add_resource(@scope, file1)
+ lambda { @compiler.add_resource(@scope, file2) }.should raise_error(Puppet::Node::Catalog::DuplicateResourceError)
end
it "should have a method for looking up resources" do