spec/xml_document_spec.rb in genit-1.0.1 vs spec/xml_document_spec.rb in genit-2.0
- old
+ new
@@ -12,6 +12,11 @@
it "should load as a fragment" do
doc = XmlDocument.open_fragment("data/templates/menu.html")
doc.css("ul#menu li").size.should >= 1
end
+ it "should exit on malformed document" do
+ lambda do
+ XmlDocument.open("spec/test-files/malformed.html")
+ end.should raise_error(SystemExit)
+ end
end