summaryrefslogtreecommitdiffstats
path: root/spec
diff options
context:
space:
mode:
authorJesse Wolfe <jes5199@gmail.com>2010-04-09 14:22:36 -0700
committerJesse Wolfe <jes5199@gmail.com>2010-04-09 14:22:36 -0700
commit94651df232b0bc0fed066ac005cccc9d5db0c152 (patch)
treeda13d3de3eb9e83c955d607efcb66eddf05721d9 /spec
parent40c1fb06162f2eebe6cd5e40a0e289cd568ec8e1 (diff)
downloadpuppet-94651df232b0bc0fed066ac005cccc9d5db0c152.tar.gz
puppet-94651df232b0bc0fed066ac005cccc9d5db0c152.tar.xz
puppet-94651df232b0bc0fed066ac005cccc9d5db0c152.zip
Add stub to Puppet::Parser::Collector test to prevent runaway stub
failures
Diffstat (limited to 'spec')
-rwxr-xr-xspec/unit/parser/collector.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/unit/parser/collector.rb b/spec/unit/parser/collector.rb
index 42da3ff9e..de5fc8015 100755
--- a/spec/unit/parser/collector.rb
+++ b/spec/unit/parser/collector.rb
@@ -272,6 +272,10 @@ describe Puppet::Parser::Collector, "when collecting exported resources" do
@equery = "test = true"
@vquery = proc { |r| true }
+ res = stub("resource 1")
+ res.stubs(:type).returns @resource_type
+ Puppet::Resource.stubs(:new).returns res
+
Puppet.settings.stubs(:value).with(:storeconfigs).returns true
Puppet.settings.stubs(:value).with(:environment).returns "production"
@@ -360,7 +364,7 @@ describe Puppet::Parser::Collector, "when collecting exported resources" do
one = stub 'one', :restype => "Mytype", :title => "one", :virtual? => true, :exported? => true, :ref => "one"
Puppet::Rails::Resource.stubs(:find).returns([one])
- resource = mock 'resource'
+ resource = mock 'resource', :type => "Mytype"
one.expects(:to_resource).with(@scope).returns(resource)
resource.stubs(:exported=)
resource.stubs(:virtual=)