spec/unit/term_spec.rb in om-1.3.0 vs spec/unit/term_spec.rb in om-1.4.0

- old
+ new

@@ -169,10 +169,17 @@ it "should accept extra options" do marcrelator_role_xml_builder_template = 'xml.roleTerm( \'#{builder_new_value}\', \'type\'=>\'code\', \'authority\'=>\'marcrelator\' )' @test_role_code.xml_builder_template(:attributes=>{"authority"=>"marcrelator"}).should == marcrelator_role_xml_builder_template end + it "should work for namespaced nodes" do + @ical_date = OM::XML::Term.new(:ical_date, :path=>"ical:date") + @ical_date.xml_builder_template.should == "xml[\"ical\"].date( '\#{builder_new_value}' )" + @ical_date = OM::XML::Term.new(:ical_date, :path=>"date", :namespace_prefix=>"ical") + @ical_date.xml_builder_template.should == "xml[\"ical\"].date( '\#{builder_new_value}' )" + end + it "should work for nodes with default_content_path" do @test_volume.xml_builder_template.should == "xml.detail( \'type\'=>'volume' ) { xml.number( '\#{builder_new_value}' ) }" end it "should support terms that are attributes" do @@ -192,6 +199,6 @@ @xml_lang_attribute_term.xml_builder_template.should == "TODO!" end end -end \ No newline at end of file +end