spec/dslh_spec.rb in dslh-0.1.2 vs spec/dslh_spec.rb in dslh-0.1.3
- old
+ new
@@ -257,6 +257,18 @@
{:key31=>{"value31"=>{:key311=>100, :key312=>"200"}},
:key32=>
{:key321=>{"value321"=>{:key3211=>"XXX", :key3212=>:XXX}}, :key322=>300}}}
)
end
+
+ it 'should convert array' do
+ h = Dslh.eval :value_conv => proc {|i| i.to_s } do
+ key1 'value1', 'value2'
+ key2 100, 200
+ end
+
+ expect(h).to eq(
+ {:key1 => ["value1", "value2"],
+ :key2 => ["100", "200"]}
+ )
+ end
end