Sha256: 6ebe9691ba67e27d38f9dd928ae194136ba5c034e83187c99add2c96679de152

Contents?: true

Size: 524 Bytes

Versions: 49

Compression:

Stored size: 524 Bytes

Contents

require File.expand_path('../../../../spec_helper', __FILE__)
require 'rexml/document'

describe "REXML::Attribute#inspect" do
  it "returns the name and value as a string" do
    a = REXML::Attribute.new("my_name", "my_value")
    a.inspect.should == "my_name='my_value'"
  end

  it "accepts attributes with no value" do
    a = REXML::Attribute.new("my_name")
    a.inspect.should == "my_name=''"
  end

  it "does not escape text" do
    a = REXML::Attribute.new("&&", "<>")
    a.inspect.should == "&&='<>'"
  end
end

Version data entries

49 entries across 49 versions & 2 rubygems

Version Path
rhodes-3.2.2 spec/framework_spec/app/spec/library/rexml/attribute/inspect_spec.rb
rhodes-3.2.2.beta spec/framework_spec/app/spec/library/rexml/attribute/inspect_spec.rb
rhodes-3.2.1 spec/framework_spec/app/spec/library/rexml/attribute/inspect_spec.rb
rhodes-3.2.0 spec/framework_spec/app/spec/library/rexml/attribute/inspect_spec.rb
rhodes-3.2.0.beta.9 spec/framework_spec/app/spec/library/rexml/attribute/inspect_spec.rb
rhodes-3.2.0.beta.8 spec/framework_spec/app/spec/library/rexml/attribute/inspect_spec.rb
rhodes-3.2.0.beta.7 spec/framework_spec/app/spec/library/rexml/attribute/inspect_spec.rb
rhodes-3.2.0.beta.6 spec/framework_spec/app/spec/library/rexml/attribute/inspect_spec.rb
rhodes-3.2.0.beta.5 spec/framework_spec/app/spec/library/rexml/attribute/inspect_spec.rb