summaryrefslogtreecommitdiff
path: root/spec/unit/parser/functions/str2bool_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/parser/functions/str2bool_spec.rb')
-rw-r--r--spec/unit/parser/functions/str2bool_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/unit/parser/functions/str2bool_spec.rb b/spec/unit/parser/functions/str2bool_spec.rb
index 6a1ac95..d7f0ac9 100644
--- a/spec/unit/parser/functions/str2bool_spec.rb
+++ b/spec/unit/parser/functions/str2bool_spec.rb
@@ -18,4 +18,14 @@ describe "the str2bool function" do
lambda { @scope.function_str2bool([]) }.should( raise_error(Puppet::ParseError))
end
+ it "should convert string 'true' to true" do
+ result = @scope.function_str2bool(["true"])
+ result.should(eq(true))
+ end
+
+ it "should convert string 'undef' to false" do
+ result = @scope.function_str2bool(["undef"])
+ result.should(eq(false))
+ end
+
end