summaryrefslogtreecommitdiff
path: root/spec
diff options
context:
space:
mode:
authorChris Edester <edestecd@miamioh.edu>2016-08-05 15:38:59 -0400
committerChris Edester <edestecd@miamioh.edu>2016-08-05 15:38:59 -0400
commit17a49baae33a78d6aa781aaaadafc08b43def040 (patch)
tree0fabeb603170308ab59fa3ddd58b2cc573219051 /spec
parent2bf9187cf8971fad35b0ffebf7c49963ba35c850 (diff)
Handle array values in join_keys_to_values function
Diffstat (limited to 'spec')
-rwxr-xr-xspec/functions/join_keys_to_values_spec.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/spec/functions/join_keys_to_values_spec.rb b/spec/functions/join_keys_to_values_spec.rb
index 6c109d1..c2bae5b 100755
--- a/spec/functions/join_keys_to_values_spec.rb
+++ b/spec/functions/join_keys_to_values_spec.rb
@@ -16,4 +16,8 @@ describe 'join_keys_to_values' do
result = subject.call([{ 'key1' => 'value1', 'key2' => 'value2' }, ':'])
expect(result.sort).to eq(['key1:value1', 'key2:value2'].sort)
end
+ it 'should run join_keys_to_values(<hash with array value>, " ") and return the proper array' do
+ result = subject.call([{ 'key1' => 'value1', 'key2' => ['value2', 'value3'] }, ' '])
+ expect(result.sort).to eq(['key1 value1', 'key2 value2', 'key2 value3'].sort)
+ end
end