Sha256: cac49a7dc9e77d5794c8b65519ede26df71e1560d4a8713fb59f70c30d741d5c
Contents?: true
Size: 851 Bytes
Versions: 10
Compression:
Stored size: 851 Bytes
Contents
require "spec_helper" def mods_display_contents(mods_record) ModsDisplay::Contents.new(mods_record, ModsDisplay::Configuration::Base.new, mock("controller")) end describe ModsDisplay::Contents do before(:all) do @contents = Stanford::Mods::Record.new.from_str("<mods><tableOfContents>Content Note</tableOfContents></mods>", false).tableOfContents @display_label = Stanford::Mods::Record.new.from_str("<mods><tableOfContents displayLabel='Special Label'>Content Note</tableOfContents></mods>", false).tableOfContents end describe "label" do it "should have a default label" do mods_display_contents(@contents).label.should == "Table of contents" end it "should use the displayLabel attribute when one is available" do mods_display_contents(@display_label).label.should == "Special Label" end end end
Version data entries
10 entries across 10 versions & 1 rubygems