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 expect(@html.scan(/
/).length).to eq(1) expect(@html.scan(%r{
}).length).to eq(1) end it 'should return a dt/dd pair for each piece of metadata in the mods' do expect(@html.scan(/
/).length).to eq(@pieces_of_data) end it 'should return a proper label' do expect(@html.scan(%r{
Title:
}).length).to eq(1) end it 'should return a proper value' do expect(@html.scan(%r{
The Title of this Item
}).length).to eq(1) end end