From 0236cd51bc2724b4ac68b91dda01d1b58b572df8 Mon Sep 17 00:00:00 2001 From: Stefan Goethals Date: Wed, 4 Jun 2014 06:12:22 -0700 Subject: Add support for hashes in the prefix function Signed-off-by: Julien Pivotto --- spec/functions/prefix_spec.rb | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'spec') 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 -- cgit v1.2.3