summaryrefslogtreecommitdiff
path: root/spec/unit/parser/functions/create_resources_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/parser/functions/create_resources_spec.rb')
-rwxr-xr-xspec/unit/parser/functions/create_resources_spec.rb6
1 files changed, 3 insertions, 3 deletions
diff --git a/spec/unit/parser/functions/create_resources_spec.rb b/spec/unit/parser/functions/create_resources_spec.rb
index 043236fd8..90548f86f 100755
--- a/spec/unit/parser/functions/create_resources_spec.rb
+++ b/spec/unit/parser/functions/create_resources_spec.rb
@@ -6,10 +6,10 @@ describe 'function for dynamically creating resources' do
include PuppetSpec::Compiler
before :each do
- @scope = Puppet::Parser::Scope.new
- @scope.compiler = Puppet::Parser::Compiler.new(Puppet::Node.new("floppy", :environment => 'production'))
+ node = Puppet::Node.new("floppy", :environment => 'production')
+ @compiler = Puppet::Parser::Compiler.new(node)
+ @scope = Puppet::Parser::Scope.new(:compiler => @compiler)
@topscope = @scope.compiler.topscope
- @compiler = @scope.compiler
@scope.parent = @topscope
Puppet::Parser::Functions.function(:create_resources)
end