diff options
Diffstat (limited to 'spec/unit/parser/ast/leaf.rb')
-rwxr-xr-x | spec/unit/parser/ast/leaf.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/spec/unit/parser/ast/leaf.rb b/spec/unit/parser/ast/leaf.rb index fecfba386..62ebc2ab1 100755 --- a/spec/unit/parser/ast/leaf.rb +++ b/spec/unit/parser/ast/leaf.rb @@ -33,6 +33,13 @@ describe Puppet::Parser::AST::Leaf do @leaf.evaluate_match("value", @scope, :insensitive => true) end + + it "should downcase the parameter value if wanted" do + parameter = stub 'parameter' + parameter.expects(:downcase).returns("value") + + @leaf.evaluate_match(parameter, @scope, :insensitive => true) + end end describe "when converting to string" do @@ -123,6 +130,12 @@ describe Puppet::Parser::AST::Regex do @regex.evaluate_match("value", @scope) end + it "should not downcase the paramater value" do + @value.expects(:match).with("VaLuE") + + @regex.evaluate_match("VaLuE", @scope) + end + it "should set ephemeral scope vars if there is a match" do @scope.expects(:ephemeral_from).with(true, nil, nil) |