From 5d5a4d466ed6530fa8b68162e96bdaaaf35066e1 Mon Sep 17 00:00:00 2001
From: Justin Lambert <jlambert@eml.cc>
Date: Mon, 17 Dec 2012 06:22:36 -0700
Subject: str2bool should return a boolean if called with a boolean

---
 spec/unit/puppet/parser/functions/str2bool_spec.rb | 7 +++++++
 1 file changed, 7 insertions(+)

(limited to 'spec/unit/puppet')

diff --git a/spec/unit/puppet/parser/functions/str2bool_spec.rb b/spec/unit/puppet/parser/functions/str2bool_spec.rb
index 2782bbe..ef6350f 100644
--- a/spec/unit/puppet/parser/functions/str2bool_spec.rb
+++ b/spec/unit/puppet/parser/functions/str2bool_spec.rb
@@ -21,4 +21,11 @@ describe "the str2bool function" do
     result = scope.function_str2bool(["undef"])
     result.should(eq(false))
   end
+  
+  it "should return the boolean it was called with" do
+    result = scope.function_str2bool([true])
+    result.should(eq(true))
+    result = scope.function_str2bool([false])
+    result.should(eq(false))
+  end
 end
-- 
cgit v1.2.3