Sha256: 4d42608c2916c841cd3ebcc955299a533bd7e64d82f621dc24384f7eda4a576c

Contents?: true

Size: 563 Bytes

Versions: 5

Compression:

Stored size: 563 Bytes

Contents

require 'rexml/document'

describe "REXML::Attribute#element" do
  it "returns the parent element" do
    e = REXML::Element.new "root"

    REXML::Attribute.new("name", "value", e).element.should == e
    REXML::Attribute.new("name", "default_constructor").element.should == nil
  end
end

describe "REXML::Attribute#element=" do
  it "sets the parent element" do
    e = REXML::Element.new "root"
    f = REXML::Element.new "temp"
    a = REXML::Attribute.new("name", "value", e)
    a.element.should == e

    a.element = f
    a.element.should == f
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
rubysl-rexml-2.0.4 spec/attribute/element_spec.rb
rubysl-rexml-2.0.3 spec/attribute/element_spec.rb
rubysl-rexml-1.0.0 spec/attribute/element_spec.rb
rubysl-rexml-2.0.2 spec/attribute/element_spec.rb
rubysl-rexml-2.0.1 spec/attribute/element_spec.rb