diff options
author | Stefan Goethals <stefan@zipkid.eu> | 2014-06-04 06:12:22 -0700 |
---|---|---|
committer | Morgan Haskel <morgan@puppetlabs.com> | 2015-03-03 16:20:55 -0800 |
commit | 0236cd51bc2724b4ac68b91dda01d1b58b572df8 (patch) | |
tree | 12b8950f2c12fcecce791a08b2f790066921bb9b /spec/functions | |
parent | b8547b7c29801ca3d89230dfc95716d6f93040ab (diff) |
Add support for hashes in the prefix function
Signed-off-by: Julien Pivotto <roidelapluie@inuits.eu>
Diffstat (limited to 'spec/functions')
-rwxr-xr-x | spec/functions/prefix_spec.rb | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/spec/functions/prefix_spec.rb b/spec/functions/prefix_spec.rb index 34cac53..aec8a7d 100755 --- a/spec/functions/prefix_spec.rb +++ b/spec/functions/prefix_spec.rb @@ -25,4 +25,9 @@ describe "the prefix function" do result = scope.function_prefix([['a','b','c'], 'p']) expect(result).to(eq(['pa','pb','pc'])) end + + it "returns a prefixed hash" do + result = scope.function_prefix([{'a' => 'b','b' => 'c','c' => 'd'}, 'p']) + expect(result).to(eq({'pa'=>'b','pb'=>'c','pc'=>'d'})) + end end |