diff options
Diffstat (limited to 'spec/functions')
-rwxr-xr-x | spec/functions/upcase_spec.rb | 8 |
1 files changed, 7 insertions, 1 deletions
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 |