Sha256: 43e0e18d9557e827c6aa5736b64cbd81ef1be9d9bf3e00c9984303ed28265224

Contents?: true

Size: 394 Bytes

Versions: 5

Compression:

Stored size: 394 Bytes

Contents

require 'rexml/document'

describe "REXML::Attribute#to_s" do
  it "returns the value of the Attribute" do
    REXML::Attribute.new("name", "some_value").to_s.should == "some_value"
  end

  it "returns the escaped value if it was created from Attribute" do
    orig = REXML::Attribute.new("name", "<&>")
    copy =  REXML::Attribute.new(orig)
    copy.to_s.should == "&lt;&amp;&gt;"
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

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