mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
Ignore rexml examples on ruby/spec
This commit is contained in:
parent
83240f315a
commit
e61cab3a36
Notes:
git
2020-01-12 12:29:06 +09:00
104 changed files with 1863 additions and 1551 deletions
|
|
@ -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 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 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
|
||||
end
|
||||
end
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue