spec/hash_spec.rb in extlib-0.9.11 vs spec/hash_spec.rb in extlib-0.9.12
- old
+ new
@@ -175,21 +175,21 @@
end
end
it "should undasherize keys as tags" do
xml = "<tag-1>Stuff</tag-1>"
- Hash.from_xml(xml).keys.should include( 'tag_1' )
+ Hash.from_xml(xml).should have_key('tag_1')
end
it "should undasherize keys as attributes" do
xml = "<tag1 attr-1='1'></tag1>"
- Hash.from_xml(xml)['tag1'].keys.should include( 'attr_1')
+ Hash.from_xml(xml)['tag1'].should have_key('attr_1')
end
it "should undasherize keys as tags and attributes" do
xml = "<tag-1 attr-1='1'></tag-1>"
- Hash.from_xml(xml).keys.should include( 'tag_1' )
- Hash.from_xml(xml)['tag_1'].keys.should include( 'attr_1')
+ Hash.from_xml(xml).should have_key('tag_1' )
+ Hash.from_xml(xml)['tag_1'].should have_key('attr_1')
end
it "should render nested content correctly" do
xml = "<root><tag1>Tag1 Content <em><strong>This is strong</strong></em></tag1></root>"
Hash.from_xml(xml)['root']['tag1'].should == "Tag1 Content <em><strong>This is strong</strong></em>"