summaryrefslogtreecommitdiff
path: root/spec/ruby/library/rexml/attribute/remove_spec.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <[email protected]>2020-01-12 08:14:26 +0900
committerSHIBATA Hiroshi <[email protected]>2020-01-12 12:28:29 +0900
commite61cab3a367c4040a2a487dd893c7be9a37889a9 (patch)
treec6ea3e3c929fcb5fd17197abea387173912f624b /spec/ruby/library/rexml/attribute/remove_spec.rb
parent83240f315a10b42b53c3b62c1fbc428f97912665 (diff)
Ignore rexml examples on ruby/spec
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/2832
Diffstat (limited to 'spec/ruby/library/rexml/attribute/remove_spec.rb')
-rw-r--r--spec/ruby/library/rexml/attribute/remove_spec.rb31
1 files changed, 17 insertions, 14 deletions
diff --git a/spec/ruby/library/rexml/attribute/remove_spec.rb b/spec/ruby/library/rexml/attribute/remove_spec.rb
index 08d22cb6ba..c7a9904eb8 100644
--- a/spec/ruby/library/rexml/attribute/remove_spec.rb
+++ b/spec/ruby/library/rexml/attribute/remove_spec.rb
@@ -1,20 +1,23 @@
require_relative '../../../spec_helper'
-require 'rexml/document'
-describe "REXML::Attribute#remove" do
- before :each do
- @e = REXML::Element.new "Root"
- @attr = REXML::Attribute.new("foo", "bar")
- end
+ruby_version_is ''...'2.8' do
+ require 'rexml/document'
- it "deletes this Attribute from parent" do
- @e.add_attribute(@attr)
- @e.attributes["foo"].should_not == nil
- @attr.remove
- @e.attributes["foo"].should == nil
- end
+ describe "REXML::Attribute#remove" do
+ before :each do
+ @e = REXML::Element.new "Root"
+ @attr = REXML::Attribute.new("foo", "bar")
+ end
+
+ it "deletes this Attribute from parent" do
+ @e.add_attribute(@attr)
+ @e.attributes["foo"].should_not == nil
+ @attr.remove
+ @e.attributes["foo"].should == nil
+ end
- it "does not anything if element has no parent" do
- -> {@attr.remove}.should_not raise_error(Exception)
+ it "does not anything if element has no parent" do
+ -> {@attr.remove}.should_not raise_error(Exception)
+ end
end
end