spec/xml/text_spec.rb in roxml-3.1.5 vs spec/xml/text_spec.rb in roxml-3.1.6

- old
+ new

@@ -1,10 +1,10 @@ -require 'spec/spec_helper' +require_relative './../spec_helper' describe ROXML::XMLTextRef do before do - @xml = ROXML::XML::Parser.parse %( + @xml = ROXML::XML.parse_string %( <myxml> <node> <name>first</name> <name>second</name> <name>third</name> @@ -31,19 +31,19 @@ it "should collect all instances" do @ref.value_in(@xml).should == ["first", "second", "third"] end it "should output all instances" do - xml = ROXML::XML::Node.create('myxml') + xml = ROXML::XML.new_node('myxml') @ref.update_xml(xml, ["first", "second", "third"]) xml.to_s.squeeze(' ').should == @xml.root.to_s.squeeze(' ') end end context "when the namespaces are different" do before do - @xml = ROXML::XML::Parser.parse %( + @xml = ROXML::XML.parse_string %( <myxml xmlns="http://example.com/three" xmlns:one="http://example.com/one" xmlns:two="http://example.com/two"> <node> <one:name>first</one:name> <two:name>second</two:name> <name>third</name> @@ -60,10 +60,10 @@ @ref.value_in(@xml).should == ["first", "second", "third"] end it "should output all instances with namespaces" do pending "Full namespace write support" - xml = ROXML::XML::Node.create('myxml') + xml = ROXML::XML.new_node('myxml') @ref.update_xml(xml, ["first", "second", "third"]) xml.should == @xml.root end end end \ No newline at end of file