summaryrefslogtreecommitdiff
path: root/spec/ruby/library/rexml/cdata/shared/to_s.rb
blob: f8c4951c95fcae651204d63fefed1c78d35e4e54 (plain)
1
2
3
4
5
6
7
8
9
10
11
describe :rexml_cdata_to_s, shared: true do
  it "returns the contents of the CData" do
    c = REXML::CData.new("some text")
    c.send(@method).should == "some text"
  end

  it "does not escape text" do
    c1 = REXML::CData.new("some& text\n")
    c1.send(@method).should == "some& text\n"
  end
end