summaryrefslogtreecommitdiff
path: root/spec/ruby/library/rexml/element/has_text_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/has_text_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/has_text_spec.rb')
-rw-r--r--spec/ruby/library/rexml/element/has_text_spec.rb23
1 files changed, 13 insertions, 10 deletions
diff --git a/spec/ruby/library/rexml/element/has_text_spec.rb b/spec/ruby/library/rexml/element/has_text_spec.rb
index e9d5a176cb..f2c5bc4ffa 100644
--- a/spec/ruby/library/rexml/element/has_text_spec.rb
+++ b/spec/ruby/library/rexml/element/has_text_spec.rb
@@ -1,16 +1,19 @@
-require 'rexml/document'
require_relative '../../../spec_helper'
-describe "REXML::Element#has_text?" do
+ruby_version_is ''...'2.8' do
+ require 'rexml/document'
- it "returns true if element has a Text child" do
- e = REXML::Element.new("Person")
- e.text = "My text"
- e.has_text?.should be_true
- end
+ describe "REXML::Element#has_text?" do
+
+ it "returns true if element has a Text child" do
+ e = REXML::Element.new("Person")
+ e.text = "My text"
+ e.has_text?.should be_true
+ end
- it "returns false if it has no Text childs" do
- e = REXML::Element.new("Person")
- e.has_text?.should be_false
+ it "returns false if it has no Text childs" do
+ e = REXML::Element.new("Person")
+ e.has_text?.should be_false
+ end
end
end