summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDan Allen <dan.j.allen@gmail.com>2022-10-18 23:49:34 -0600
committerDan Allen <dan.j.allen@gmail.com>2022-10-18 23:49:34 -0600
commit6c7dc72147e983e04652e3f3fb0d739c2d43ac71 (patch)
tree12d56cc12f4e9dd06c3a46ef1b5d00162e39ce45
parent70248c19bc559fb4535f8aa06b3208b8f1a648c7 (diff)
remove workarounds for JRuby 9.1 in test suite
-rw-r--r--test/syntax_highlighter_test.rb2
-rw-r--r--test/test_helper.rb12
2 files changed, 2 insertions, 12 deletions
diff --git a/test/syntax_highlighter_test.rb b/test/syntax_highlighter_test.rb
index e2c8abe9..5cf5142b 100644
--- a/test/syntax_highlighter_test.rb
+++ b/test/syntax_highlighter_test.rb
@@ -1143,7 +1143,7 @@ context 'Syntax Highlighter' do
assert_includes css, 'background-color: #49483e;'
end
- test 'should not fail to load rouge if the Asciidoctor module is included into the global namespace', unless: jruby_9_1_windows? do
+ test 'should not fail to load rouge if the Asciidoctor module is included into the global namespace' do
result = run_command(asciidoctor_cmd, '-r', (fixture_path 'include-asciidoctor.rb'), '-s', '-o', '-', '-a', 'source-highlighter=rouge', (fixture_path 'source-block.adoc'), use_bundler: true) {|out| out.read }
assert_xpath '//pre[@class="rouge highlight"]', result, 1
end
diff --git a/test/test_helper.rb b/test/test_helper.rb
index 50a49068..097c625f 100644
--- a/test/test_helper.rb
+++ b/test/test_helper.rb
@@ -35,14 +35,6 @@ class Minitest::Test
RUBY_ENGINE == 'jruby'
end
- def self.jruby_9_1_windows?
- RUBY_ENGINE == 'jruby' && windows? && (JRUBY_VERSION.start_with? '9.1.')
- end
-
- def jruby_9_1_windows?
- Minitest::Test.jruby_9_1_windows?
- end
-
def self.windows?
/mswin|msys|mingw/.match? RbConfig::CONFIG['host_os']
end
@@ -350,11 +342,9 @@ class Minitest::Test
kw_args = Hash === args[-1] ? args.pop : {}
env = kw_args[:env]
(env ||= {})['RUBYOPT'] = nil unless kw_args[:use_bundler]
- # JRuby 9.1 on Windows doesn't support popen options; therefore, test cannot capture / assert on stderr
- opts = jruby_9_1_windows? ? {} : { err: [:child, :out] }
+ opts = { err: [:child, :out] }
if env
# NOTE while JRuby 9.2.10.0 implements support for unsetenv_others, it doesn't work in child
- #if jruby? && (Gem::Version.new JRUBY_VERSION) < (Gem::Version.new '9.2.10.0')
if jruby?
begin
old_env, env = ENV.merge, (ENV.merge env)