summaryrefslogtreecommitdiff
path: root/spec/functions
diff options
context:
space:
mode:
authorTravis Fields <travis@puppetlabs.com>2015-02-25 11:39:27 -0800
committerTravis Fields <travis@puppetlabs.com>2015-02-25 11:39:27 -0800
commit7021b1f55cdc320c7eb389cd91f6be294629669b (patch)
tree80734f517b7366c0eb22089384c0a727bccab944 /spec/functions
parent3da8d17390832daa7036df06976c442c4f2c7b5d (diff)
Add Hash to upcase
Diffstat (limited to 'spec/functions')
-rwxr-xr-xspec/functions/upcase_spec.rb8
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