summaryrefslogtreecommitdiff
path: root/spec/unit/parser/functions/require_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/parser/functions/require_spec.rb')
-rwxr-xr-xspec/unit/parser/functions/require_spec.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/spec/unit/parser/functions/require_spec.rb b/spec/unit/parser/functions/require_spec.rb
index 9d1e4710a..578696255 100755
--- a/spec/unit/parser/functions/require_spec.rb
+++ b/spec/unit/parser/functions/require_spec.rb
@@ -8,11 +8,12 @@ describe "the require function" do
before :each do
@catalog = stub 'catalog'
- @compiler = stub 'compiler', :catalog => @catalog, :environment => nil
- @scope = Puppet::Parser::Scope.new
+ node = Puppet::Node.new('localhost')
+ compiler = Puppet::Parser::Compiler.new(node)
+ @scope = Puppet::Parser::Scope.new(:compiler => compiler)
+
@scope.stubs(:findresource)
- @scope.stubs(:compiler).returns(@compiler)
@klass = stub 'class', :name => "myclass"
@scope.stubs(:find_hostclass).returns(@klass)