summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2021-12-27 04:23:39 -0700
committerGitHub <noreply@github.com>2021-12-27 04:23:39 -0700
commitaabea89e8d5bbb9a1aee6c5bb06678d0ffcac3b6 (patch)
tree5b9dd65368000917bda378fea96e37cbd7d35d64 /test
parent317823d41780e0e79cbfacfeabb72fb8002c6ab4 (diff)
resolves #4227 fix open-uri-cached integration on Ruby 3.1 (PR #4228)
Diffstat (limited to 'test')
-rw-r--r--test/blocks_test.rb4
-rw-r--r--test/test_helper.rb4
2 files changed, 2 insertions, 6 deletions
diff --git a/test/blocks_test.rb b/test/blocks_test.rb
index d9afe4c7..cbd686eb 100644
--- a/test/blocks_test.rb
+++ b/test/blocks_test.rb
@@ -2486,7 +2486,7 @@ context 'Blocks' do
assert_css 'svg circle', output, 1
end
- test 'should cache remote SVG when allow-uri-read, cache-uri, and inline option are set', unless: ruby_3_1_up? do
+ test 'should cache remote SVG when allow-uri-read, cache-uri, and inline option are set' do
begin
if OpenURI.respond_to? :cache_open_uri
OpenURI.singleton_class.send :remove_method, :open_uri
@@ -2955,7 +2955,7 @@ context 'Blocks' do
assert_xpath '//img[@src="data:image/gif;base64,R0lGODlhAQABAIAAAAUEBAAAACwAAAAAAQABAAACAkQBADs="][@alt="Dot"]', output, 1
end
- test 'should cache remote image when allow-uri-read, cache-uri, and data-uri are set', unless: ruby_3_1_up? do
+ test 'should cache remote image when allow-uri-read, cache-uri, and data-uri are set' do
begin
if OpenURI.respond_to? :cache_open_uri
OpenURI.singleton_class.send :remove_method, :open_uri
diff --git a/test/test_helper.rb b/test/test_helper.rb
index f948694d..b8d9d0ef 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -51,10 +51,6 @@ class Minitest::Test
Minitest::Test.windows?
end
- def self.ruby_3_1_up?
- (Gem::Version.new RUBY_VERSION) >= (Gem::Version.new '3.1.0')
- end
-
def disk_root
%(#{windows? ? (Asciidoctor::ROOT_DIR.partition '/')[0] : ''}/)
end