summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNick Lewis <nick@puppetlabs.com>2010-07-26 12:37:02 -0700
committermarkus <markus@AVA-351181.(none)>2010-08-03 15:19:16 -0700
commit8237f686c53e8d1e45097c65c7d50b84ca83bb39 (patch)
treebd3631a31ada1ebef984e6167984113470663d59
parentd5ad0fbd44aa45f38b399b0f3da6b59833fc74db (diff)
downloadpuppet-8237f686c53e8d1e45097c65c7d50b84ca83bb39.tar.gz
puppet-8237f686c53e8d1e45097c65c7d50b84ca83bb39.tar.xz
puppet-8237f686c53e8d1e45097c65c7d50b84ca83bb39.zip
[#4242] Fixed (removed) a broken unit test
This test ran into a mocha bug, and was stubbing too much anyway. It's being moved to an acceptance test.
-rw-r--r--spec/unit/parser/functions/include_spec.rb22
1 files changed, 0 insertions, 22 deletions
diff --git a/spec/unit/parser/functions/include_spec.rb b/spec/unit/parser/functions/include_spec.rb
index e5f051906..4f609b055 100644
--- a/spec/unit/parser/functions/include_spec.rb
+++ b/spec/unit/parser/functions/include_spec.rb
@@ -8,10 +8,6 @@ describe "the 'include' function" do
Puppet::Node::Environment.stubs(:current).returns(nil)
@compiler = Puppet::Parser::Compiler.new(Puppet::Node.new("foo"))
@scope = Puppet::Parser::Scope.new(:compiler => @compiler)
- # MQR TODO: Without the following stub these tests cause hundreds of spurious errors in
- # subsequent tests. With it, there are no spurious failures and all but one
- # of the tests (marked pending, bellow) fail. This needs a better solution.
- Puppet::Parser::Resource.stubs(:new).with('stage', :main, :scope => @scope).returns 'foo'
end
it "should exist" do
@@ -34,22 +30,4 @@ describe "the 'include' function" do
@compiler.expects(:evaluate_classes).with {|klasses,parser,lazy| lazy == false}.returns("foo")
@scope.function_include("foo")
end
-
- it "should allow a parent to include its child" do
- pending "Resolution of MQR TODO item, above"
- @parent_type = Puppet::Resource::Type.new(:hostclass, "parent")
- @parent_resource = Puppet::Parser::Resource.new(:hostclass, "parent", :scope => @scope)
- @subscope = @parent_type.subscope(@scope,@parent_resource)
- @scope.environment.known_resource_types.stubs(:find_hostclass).with{|nses,name| name.downcase == "parent"}.returns(@parent_type)
-
- @type = Puppet::Resource::Type.new(:hostclass, "foo")
- @type.stubs(:parent_scope).returns(@subscope)
- @type.parent = "parent"
- @resource = Puppet::Parser::Resource.new(:hostclass, "foo", :scope => @subscope)
- @resource.stubs(:resource_type).returns(@type)
- @scope.environment.known_resource_types.stubs(:find_hostclass).with{|nses,name| name.downcase == "foo"}.returns(@parent_type)
- Puppet::Resource.stubs(:new).returns(@resource)
- Puppet::Parser::Resource.stubs(:new).returns(@resource)
- lambda { @subscope.function_include("foo") }.should_not raise_error
- end
end