Sha256: d4e4756f4307c4f06a1e08abafb4a438a70b87f775d7c2ee38f957365b13138c
Contents?: true
Size: 594 Bytes
Versions: 49
Compression:
Stored size: 594 Bytes
Contents
require 'rexml/document' require File.expand_path('../../../../spec_helper', __FILE__) describe "REXML::Element#add_namespace" do before :each do @name = REXML::Element.new "Name" end it "adds text to an element" do @name.add_text "Ringo" @name.to_s.should == "<Name>Ringo</Name>" end it "accepts a Text" do @name.add_text(REXML::Text.new("Ringo")) @name.to_s.should == "<Name>Ringo</Name>" end it "joins the new text with the old one" do @name.add_text "Ringo" @name.add_text " Starr" @name.to_s.should == "<Name>Ringo Starr</Name>" end end
Version data entries
49 entries across 49 versions & 2 rubygems