Sha256: 2edffbf5c6e642f274e78138178e056dda685c83fd5384b6a6aff462640364dc

Contents?: true

Size: 535 Bytes

Versions: 2

Compression:

Stored size: 535 Bytes

Contents

# -*- encoding: utf-8 -*-

require './spec/helper'

describe XmlDocument do

  it "should load as a document" do
    doc = XmlDocument.open("data/templates/menu.html")
    doc.css("ul#menu li").size.should >= 1
  end
  
  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

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
genit-2.1 spec/xml_document_spec.rb
genit-2.0 spec/xml_document_spec.rb