diff options
author | Hiroshi SHIBATA <hsbt@ruby-lang.org> | 2020-01-12 08:14:26 +0900 |
---|---|---|
committer | SHIBATA Hiroshi <hsbt@ruby-lang.org> | 2020-01-12 12:28:29 +0900 |
commit | e61cab3a367c4040a2a487dd893c7be9a37889a9 (patch) | |
tree | c6ea3e3c929fcb5fd17197abea387173912f624b /spec/ruby/library/rexml/attributes/to_a_spec.rb | |
parent | 83240f315a10b42b53c3b62c1fbc428f97912665 (diff) |
Ignore rexml examples on ruby/spec
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/2832
Diffstat (limited to 'spec/ruby/library/rexml/attributes/to_a_spec.rb')
-rw-r--r-- | spec/ruby/library/rexml/attributes/to_a_spec.rb | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/spec/ruby/library/rexml/attributes/to_a_spec.rb b/spec/ruby/library/rexml/attributes/to_a_spec.rb index 1fbf71b683..cc98e4f0d9 100644 --- a/spec/ruby/library/rexml/attributes/to_a_spec.rb +++ b/spec/ruby/library/rexml/attributes/to_a_spec.rb @@ -1,19 +1,22 @@ require_relative '../../../spec_helper' -require 'rexml/document' -describe "REXML::Attributes#to_a" do - it "returns an array with the attributes" do - e = REXML::Element.new("root") - name = REXML::Attribute.new("name", "Dave") - last = REXML::Attribute.new("last_name", "Murray") +ruby_version_is ''...'2.8' do + require 'rexml/document' - e.attributes << name - e.attributes << last + describe "REXML::Attributes#to_a" do + it "returns an array with the attributes" do + e = REXML::Element.new("root") + name = REXML::Attribute.new("name", "Dave") + last = REXML::Attribute.new("last_name", "Murray") - e.attributes.to_a.sort{|a,b|a.to_s<=>b.to_s}.should == [name, last] - end + e.attributes << name + e.attributes << last + + e.attributes.to_a.sort{|a,b|a.to_s<=>b.to_s}.should == [name, last] + end - it "returns an empty array if it has no attributes" do - REXML::Element.new("root").attributes.to_a.should == [] + it "returns an empty array if it has no attributes" do + REXML::Element.new("root").attributes.to_a.should == [] + end end end |