Sha256: 653f459de129fa14e8ce279abc7bd8b5b738ebd8178a4f1205935d85761f72d8

Contents?: true

Size: 886 Bytes

Versions: 25

Compression:

Stored size: 886 Bytes

Contents

require "spec_helper"

describe "Installation" do
  before(:all) do
    @pieces_of_data = 1
    title_xml = "<mods><titleInfo><title>The Title of this Item</title></titleInfo></mods>"
    model = TestModel.new
    model.modsxml = title_xml
    controller = TestController.new
    @html = controller.render_mods_display(model)
  end
  it "should return a single <dl>" do
    @html.scan(/<dl>/).length.should == 1
    @html.scan(/<\/dl>/).length.should == 1
  end
  it "should return a dt/dd pair for each piece of metadata in the mods" do
    @html.scan(/<dt/).length.should == @pieces_of_data
    @html.scan(/<dd>/).length.should == @pieces_of_data
  end
  it "should return a proper label" do
    @html.scan(/<dt title='Title'>Title:<\/dt>/).length.should == 1
  end
  it "should return a proper value" do
    @html.scan(/<dd>The Title of this Item<\/dd>/).length.should == 1
  end
end

Version data entries

25 entries across 25 versions & 1 rubygems

Version Path
mods_display-0.3.3 spec/integration/installation_spec.rb
mods_display-0.3.2 spec/integration/installation_spec.rb
mods_display-0.3.1 spec/integration/installation_spec.rb
mods_display-0.3.0 spec/integration/installation_spec.rb
mods_display-0.2.4 spec/integration/installation_spec.rb
mods_display-0.2.3 spec/integration/installation_spec.rb
mods_display-0.2.2 spec/integration/installation_spec.rb
mods_display-0.2.1 spec/integration/installation_spec.rb
mods_display-0.2.0 spec/integration/installation_spec.rb
mods_display-0.1.4 spec/integration/installation_spec.rb
mods_display-0.1.3 spec/integration/installation_spec.rb
mods_display-0.1.2 spec/integration/installation_spec.rb
mods_display-0.1.1 spec/integration/installation_spec.rb
mods_display-0.1.0 spec/integration/installation_spec.rb
mods_display-0.0.5 spec/integration/installation_spec.rb
mods_display-0.0.4 spec/integration/installation_spec.rb
mods_display-0.0.3 spec/integration/installation_spec.rb
mods_display-0.0.2 spec/integration/installation_spec.rb
mods_display-0.0.1 spec/integration/installation_spec.rb
mods_display-0.0.1.beta6 spec/integration/installation_spec.rb