summaryrefslogtreecommitdiff
path: root/spec/ruby/library/rexml/element/root_spec.rb
diff options
context:
space:
mode:
authorHiroshi SHIBATA <hsbt@ruby-lang.org>2020-01-12 08:14:26 +0900
committerSHIBATA Hiroshi <hsbt@ruby-lang.org>2020-01-12 12:28:29 +0900
commite61cab3a367c4040a2a487dd893c7be9a37889a9 (patch)
treec6ea3e3c929fcb5fd17197abea387173912f624b /spec/ruby/library/rexml/element/root_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/element/root_spec.rb')
-rw-r--r--spec/ruby/library/rexml/element/root_spec.rb43
1 files changed, 23 insertions, 20 deletions
diff --git a/spec/ruby/library/rexml/element/root_spec.rb b/spec/ruby/library/rexml/element/root_spec.rb
index 1e0669033e..4e88446ac2 100644
--- a/spec/ruby/library/rexml/element/root_spec.rb
+++ b/spec/ruby/library/rexml/element/root_spec.rb
@@ -1,28 +1,31 @@
require_relative '../../../spec_helper'
-require 'rexml/document'
-describe "REXML::Element#root" do
- before :each do
- @doc = REXML::Document.new
- @root = REXML::Element.new "root"
- @node = REXML::Element.new "node"
- @doc << @root << @node
- end
+ruby_version_is ''...'2.8' do
+ require 'rexml/document'
- it "returns first child on documents" do
- @doc.root.should == @root
- end
+ describe "REXML::Element#root" do
+ before :each do
+ @doc = REXML::Document.new
+ @root = REXML::Element.new "root"
+ @node = REXML::Element.new "node"
+ @doc << @root << @node
+ end
- it "returns self on root nodes" do
- @root.root.should == @root
- end
+ it "returns first child on documents" do
+ @doc.root.should == @root
+ end
- it "returns parent's root on child nodes" do
- @node.root.should == @root
- end
+ it "returns self on root nodes" do
+ @root.root.should == @root
+ end
+
+ it "returns parent's root on child nodes" do
+ @node.root.should == @root
+ end
- it "returns self on standalone nodes" do
- e = REXML::Element.new "Elem" # Note that it doesn't have a parent node
- e.root.should == e
+ it "returns self on standalone nodes" do
+ e = REXML::Element.new "Elem" # Note that it doesn't have a parent node
+ e.root.should == e
+ end
end
end