summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorTP Honey <tphoney@users.noreply.github.com>2015-03-05 15:45:39 +0000
committerTP Honey <tphoney@users.noreply.github.com>2015-03-05 15:45:39 +0000
commit706b9e8205f1ff205226ef53e7d9b58de5cb6e54 (patch)
tree1174d15f958b302a015789ce757d4d52fb0b5d58 /spec
parent20d49394fb8dd8c0482ca2be4214f9f596c03f11 (diff)
parent0236cd51bc2724b4ac68b91dda01d1b58b572df8 (diff)
Merge pull request #420 from mhaskel/improveprefix
Add support for hashes in the prefix function
Diffstat (limited to 'spec')
-rwxr-xr-xspec/functions/prefix_spec.rb5
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