Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 14e398b

Browse files
committedAug 19, 2024·
WIP fix for Jruby spec
1 parent 0913683 commit 14e398b

File tree

2 files changed

+9
-1
lines changed

2 files changed

+9
-1
lines changed
 

‎Gemfile

+4
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,10 @@ group :coverage do
5151
gem 'simplecov', '~> 0.8'
5252
end
5353

54+
if RUBY_ENGINE == 'java'
55+
gem 'tempfile.rb', require: false
56+
end
57+
5458
if RUBY_VERSION < '2.0.0' || RUBY_ENGINE == 'java'
5559
gem 'json', '< 2.0.0' # is a dependency of simplecov
5660
else

‎spec/rspec/support/spec/stderr_splitter_spec.rb

+5-1
Original file line numberDiff line numberDiff line change
@@ -101,7 +101,11 @@
101101

102102
# This is essentially what the `to_stderr_from_any_process` matcher attempts
103103
# to do in CaptureStreamToTempfile.
104-
it 'is able to restore the stream from a cloned StdErrSplitter', :pending => RSpec::Support::Ruby.jruby? do
104+
it 'is able to restore the stream from a cloned StdErrSplitter' do
105+
if RSpec::Support::Ruby.jruby? && Tempfile.new("foo").is_a?(File) == false
106+
require 'tempfile'
107+
end
108+
105109
cloned = $stderr.clone
106110
expect($stderr.to_io).not_to be_a(File)
107111

0 commit comments

Comments
 (0)
This repository has been archived.