spec/dslh_spec.rb in dslh-0.2.7 vs spec/dslh_spec.rb in dslh-0.3.0
- old
+ new
@@ -2498,6 +2498,36 @@
end
end
end
EOS
end
+
+ it 'include "system()"' do
+ h = Dslh.eval(:ignore_methods => [:system]) do
+ system do
+ key1 'value'
+ key2 100
+
+ key3(
+ 100 => 200,
+ 'XXX' => :XXX
+ )
+
+ key4 do
+ system(
+ '300' => '400',
+ :FOO => :BAR
+ )
+ key42 100
+ end
+ end
+ end
+
+ expect(h).to eq(
+ {"system"=>
+ {:key1=>"value",
+ :key2=>100,
+ :key3=>{100=>200, "XXX"=>:XXX},
+ :key4=>{"system"=>{"300"=>"400", :FOO=>:BAR}, :key42=>100}}}
+ )
+ end
end