spec/dslh_spec.rb in dslh-0.2.6 vs spec/dslh_spec.rb in dslh-0.2.7

- old
+ new

@@ -2455,6 +2455,49 @@ Description "Drupal Website" end end EOS end + + it 'should be hash that include empty array' do + h = {"glossary"=> + {"title"=>"example glossary", + "GlossDiv"=> + {"title"=>"S", + "GlossList"=> + {"GlossEntry"=> + {"ID"=>"SGML", + "SortAs"=>"SGML", + "GlossTerm"=>"Standard Generalized Markup Language", + "Acronym"=>"SGML", + "Abbrev"=>"ISO 8879:1986", + "GlossDef"=> + {"para"=> + "A meta-markup language, used to create markup languages such as DocBook.", + "GlossSeeAlso"=>[]}, + "GlossSee"=>"markup"}}}}} + + dsl = Dslh.deval(h) + expect(dsl).to eq(<<-EOS) +glossary do + title "example glossary" + GlossDiv do + title "S" + GlossList do + GlossEntry do + ID "SGML" + SortAs "SGML" + GlossTerm "Standard Generalized Markup Language" + Acronym "SGML" + Abbrev "ISO 8879:1986" + GlossDef( + {"para"=> + "A meta-markup language, used to create markup languages such as DocBook.", + "GlossSeeAlso"=>[]}) + GlossSee "markup" + end + end + end +end + EOS + end end