Skip to content
This repository was archived by the owner on Nov 30, 2024. It is now read-only.

Commit 43db5ab

Browse files
committed
debug
1 parent 24ccca9 commit 43db5ab

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

spec/rspec/support/spec/stderr_splitter_spec.rb

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,24 +101,29 @@
101101

102102
# This spec replicates what matchers do when capturing stderr, e.g `to_stderr_from_any_process`
103103
it 'is able to restore the stream from a cloned StdErrSplitter' do
104+
puts STDERR.fileno
105+
puts STDERR.respond_to?(:path) && STDERR.path
104106
if RSpec::Support::Ruby.jruby? && !RSpec::Support::Ruby.jruby_9000?
105-
skip "JRuby < 9.0.0.0 doesn't have a predictable identifier for stdout"
107+
#skip "JRuby < 9.0.0.0 doesn't have a predictable identifier for stdout"
106108
end
107109

108110
cloned = splitter.clone
109111
expect(splitter.to_io).to be_stderr
112+
puts splitter.to_io.fileno
110113

111114
tempfile = Tempfile.new("foo")
112115
begin
113116
splitter.reopen(tempfile)
114117
expect(splitter.to_io).to_not be_stderr
118+
puts splitter.to_io.fileno
115119
ensure
116120
splitter.reopen(cloned)
117121
tempfile.close
118122
tempfile.unlink
119123
end
120124
# This is the important part of the test that would fail without proper cloning hygeine
121125
expect(splitter.to_io).to be_stderr
126+
puts splitter.to_io.fileno
122127
end
123128

124129
# Detecting STDERR in a way that doesn't use a reference

0 commit comments

Comments
 (0)