Sha256: 2173dbb8a004aeb30bc245084423792a6d28e169f1d9c3537ff81d3f6106d575

Contents?: true

Size: 375 Bytes

Versions: 5

Compression:

Stored size: 375 Bytes

Contents

require 'rexml/document'

describe :rexml_attribute_length, :shared => true do
  it "returns the number of attributes" do
    e = REXML::Element.new("root")
    e.attributes.send(@method).should == 0

    e.attributes << REXML::Attribute.new("name", "John")
    e.attributes << REXML::Attribute.new("another_name", "Leo")
    e.attributes.send(@method).should == 2
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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