Sha256: 7332c00df33bb6adb28b6d4fc3234b680db0182c3560f6e32c1b040a7e832737

Contents?: true

Size: 512 Bytes

Versions: 5

Compression:

Stored size: 512 Bytes

Contents

require 'rexml/document'

describe "REXML::Attributes#initialize" do
  it "is auto initialized by Element" do
    e = REXML::Element.new "root"
    e.attributes.should be_kind_of(REXML::Attributes)

    e.attributes << REXML::Attribute.new("name", "Paul")
    e.attributes["name"].should == "Paul"
  end

  it "receives a parent node" do
    e = REXML::Element.new "root"
    a = REXML::Attributes.new(e)
    e.attributes << REXML::Attribute.new("name", "Vic")
    e.attributes["name"].should == "Vic"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubysl-rexml-2.0.4 spec/attributes/initialize_spec.rb
rubysl-rexml-2.0.3 spec/attributes/initialize_spec.rb
rubysl-rexml-1.0.0 spec/attributes/initialize_spec.rb
rubysl-rexml-2.0.2 spec/attributes/initialize_spec.rb
rubysl-rexml-2.0.1 spec/attributes/initialize_spec.rb