summaryrefslogtreecommitdiff
path: root/spec/ruby/library/cgi/escapeElement_spec.rb
diff options
context:
space:
mode:
Diffstat (limited to 'spec/ruby/library/cgi/escapeElement_spec.rb')
-rw-r--r--spec/ruby/library/cgi/escapeElement_spec.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/spec/ruby/library/cgi/escapeElement_spec.rb b/spec/ruby/library/cgi/escapeElement_spec.rb
index 18f804c7da..72c38d6028 100644
--- a/spec/ruby/library/cgi/escapeElement_spec.rb
+++ b/spec/ruby/library/cgi/escapeElement_spec.rb
@@ -1,5 +1,11 @@
-require File.expand_path('../../../spec_helper', __FILE__)
-require 'cgi'
+require_relative '../../spec_helper'
+
+ruby_version_is ""..."4.0" do
+ require 'cgi'
+end
+ruby_version_is "4.0" do
+ require 'cgi/escape'
+end
describe "CGI.escapeElement when passed String, elements, ..." do
it "escapes only the tags of the passed elements in the passed String" do