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