Sha256: d8c9dc17d7875c8a60c332cccebed1f4077d799ad2ed6a04c5910c5605cfca67

Contents?: true

Size: 481 Bytes

Versions: 5

Compression:

Stored size: 481 Bytes

Contents

require 'rexml/document'

describe "REXML::Element#cdatas" do
  before :each do
    @e = REXML::Element.new("Root")
  end

  it "returns the array of children cdatas" do
    c = REXML::CData.new("Primary")
    d = REXML::CData.new("Secondary")
    @e << c
    @e << d
    @e.cdatas.should == [c, d]
  end

  it "freezes the returned array" do
    @e.cdatas.frozen?.should == true
  end

  it "returns an empty array if element has no cdata" do
    @e.cdatas.should == []
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubysl-rexml-2.0.4 spec/element/cdatas_spec.rb
rubysl-rexml-2.0.3 spec/element/cdatas_spec.rb
rubysl-rexml-1.0.0 spec/element/cdatas_spec.rb
rubysl-rexml-2.0.2 spec/element/cdatas_spec.rb
rubysl-rexml-2.0.1 spec/element/cdatas_spec.rb