summaryrefslogtreecommitdiff
path: root/spec/unit/parser/functions/bool2num_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/unit/parser/functions/bool2num_spec.rb')
-rwxr-xr-xspec/unit/parser/functions/bool2num_spec.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/spec/unit/parser/functions/bool2num_spec.rb b/spec/unit/parser/functions/bool2num_spec.rb
index a2585e9..d5da18c 100755
--- a/spec/unit/parser/functions/bool2num_spec.rb
+++ b/spec/unit/parser/functions/bool2num_spec.rb
@@ -18,4 +18,14 @@ describe "the bool2num function" do
lambda { @scope.function_bool2num([]) }.should( raise_error(Puppet::ParseError))
end
+ it "should convert true to 1" do
+ result = @scope.function_bool2num([true])
+ result.should(eq(1))
+ end
+
+ it "should convert false to 0" do
+ result = @scope.function_bool2num([false])
+ result.should(eq(0))
+ end
+
end