diff options
Diffstat (limited to 'spec/unit')
-rwxr-xr-x | spec/unit/puppet/parser/functions/bool2str_spec.rb | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/spec/unit/puppet/parser/functions/bool2str_spec.rb b/spec/unit/puppet/parser/functions/bool2str_spec.rb index c73f7df..bed7e68 100755 --- a/spec/unit/puppet/parser/functions/bool2str_spec.rb +++ b/spec/unit/puppet/parser/functions/bool2str_spec.rb @@ -31,4 +31,16 @@ describe "the bool2str function" do result = scope.function_bool2str([false]) result.class.should(eq(String)) end + + it "should not accept a string" do + lambda { scope.function_bool2str(["false"]) }.should( raise_error(Puppet::ParseError)) + end + + it "should not accept a nil value" do + lambda { scope.function_bool2str([nil]) }.should( raise_error(Puppet::ParseError)) + end + + it "should not accept an undef" do + lambda { scope.function_bool2str([:undef]) }.should( raise_error(Puppet::ParseError)) + end end |