2018-03-04 10:09:32 -05:00
|
|
|
require_relative '../../../spec_helper'
|
2017-05-07 08:04:49 -04:00
|
|
|
|
2020-01-11 18:14:26 -05:00
|
|
|
ruby_version_is ''...'2.8' do
|
|
|
|
require 'rexml/document'
|
|
|
|
|
|
|
|
describe "REXML::Attributes#get_attribute_ns" do
|
|
|
|
it "returns an attribute by name and namespace" do
|
|
|
|
e = REXML::Element.new("root")
|
|
|
|
attr = REXML::Attribute.new("xmlns:ns", "http://some_url")
|
|
|
|
e.attributes << attr
|
|
|
|
attr.prefix.should == "xmlns"
|
|
|
|
# This might be a bug in Attribute, commenting until those specs
|
|
|
|
# are ready
|
|
|
|
# e.attributes.get_attribute_ns(attr.prefix, "name").should == "http://some_url"
|
|
|
|
end
|
2017-05-07 08:04:49 -04:00
|
|
|
end
|
|
|
|
end
|