blob: 8164828e1e13cf9bcbe8ffe66e7d820489313eae (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
|
#!/usr/bin/env rspec
require 'spec_helper'
describe Puppet::Parser::AST::ResourceDefaults do
ast = Puppet::Parser::AST
before :each do
@compiler = Puppet::Parser::Compiler.new(Puppet::Node.new("mynode"))
@scope = Puppet::Parser::Scope.new(:compiler => @compiler)
@params = Puppet::Parser::AST::ASTArray.new({})
@compiler.stubs(:add_override)
end
it "should add defaults when evaluated" do
default = Puppet::Parser::AST::ResourceDefaults.new :type => "file", :parameters => Puppet::Parser::AST::ASTArray.new(:children => [])
default.evaluate @scope
@scope.lookupdefaults("file").should_not be_nil
end
end
|