spec/fields/description_spec.rb in mods_display-0.2.4 vs spec/fields/description_spec.rb in mods_display-0.3.0

- old
+ new

@@ -11,19 +11,19 @@ @child_display_label = Stanford::Mods::Record.new.from_str("<mods><physicalDescription><note displayLabel='Note Label'>Description Note</note></physicalDescription></mods>", false).physical_description @mixed = Stanford::Mods::Record.new.from_str("<mods><physicalDescription><note>Description Note</note><digitalOrigin>Digital Origin Note</digitalOrigin></physicalDescription></mods>", false).physical_description end describe "labels" do it "should use the displayLabel if one is provided" do - mods_display_description(@display_label).fields.first.label.should == "SpecialLabel" + mods_display_description(@display_label).fields.first.label.should == "SpecialLabel:" end it "should get the default label for a child element" do - mods_display_description(@form).fields.first.label.should == "Note" + mods_display_description(@form).fields.first.label.should == "Note:" end it "should get multiple lables for mixed content" do - mods_display_description(@mixed).fields.map{|v| v.label }.should == ["Note", "Digital origin"] + mods_display_description(@mixed).fields.map{|v| v.label }.should == ["Note:", "Digital origin:"] end it "should get the display label from child elements" do - mods_display_description(@child_display_label).fields.map{|f| f.label }.should == ["Note Label"] + mods_display_description(@child_display_label).fields.map{|f| f.label }.should == ["Note Label:"] end end describe "fields" do it "should get the value from a field in physicalDescription" do \ No newline at end of file