From 7021b1f55cdc320c7eb389cd91f6be294629669b Mon Sep 17 00:00:00 2001 From: Travis Fields Date: Wed, 25 Feb 2015 11:39:27 -0800 Subject: Add Hash to upcase --- spec/functions/upcase_spec.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'spec/functions/upcase_spec.rb') diff --git a/spec/functions/upcase_spec.rb b/spec/functions/upcase_spec.rb index 3cf8b05..a50a3ab 100755 --- a/spec/functions/upcase_spec.rb +++ b/spec/functions/upcase_spec.rb @@ -9,7 +9,7 @@ describe "the upcase function" do end it "should raise a ParseError if there is less than 1 arguments" do - expect { scope.function_upcase([]) }.to( raise_error(Puppet::ParseError)) + expect { scope.function_upcase([]) }.to(raise_error(Puppet::ParseError)) end it "should upcase a string" do @@ -30,4 +30,10 @@ describe "the upcase function" do result = scope.function_upcase([value]) result.should(eq('ABC')) end + + it 'should accept hashes and return uppercase' do + expect( + scope.function_upcase([{'test' => %w(this that and other thing)}]) + ).to eq({'TEST' => %w(THIS THAT AND OTHER THING)}) + end end -- cgit v1.2.3