require "spec_helper" describe "Installation" do before(:all) do @pieces_of_data = 1 title_xml = "The Title of this Item" model = TestModel.new model.modsxml = title_xml controller = TestController.new @html = controller.render_mods_display(model) end it "should return a single
" do @html.scan(/
/).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(/
/).length.should == @pieces_of_data end it "should return a proper label" do @html.scan(/
Title:<\/dt>/).length.should == 1 end it "should return a proper value" do @html.scan(/
The Title of this Item<\/dd>/).length.should == 1 end end