This repository was archived by the owner on Nov 30, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change 101
101
102
102
# This spec replicates what matchers do when capturing stderr, e.g `to_stderr_from_any_process`
103
103
it 'is able to restore the stream from a cloned StdErrSplitter' do
104
+ puts STDERR . fileno
105
+ puts STDERR . respond_to? ( :path ) && STDERR . path
104
106
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"
106
108
end
107
109
108
110
cloned = splitter . clone
109
111
expect ( splitter . to_io ) . to be_stderr
112
+ puts splitter . to_io . fileno
110
113
111
114
tempfile = Tempfile . new ( "foo" )
112
115
begin
113
116
splitter . reopen ( tempfile )
114
117
expect ( splitter . to_io ) . to_not be_stderr
118
+ puts splitter . to_io . fileno
115
119
ensure
116
120
splitter . reopen ( cloned )
117
121
tempfile . close
118
122
tempfile . unlink
119
123
end
120
124
# This is the important part of the test that would fail without proper cloning hygeine
121
125
expect ( splitter . to_io ) . to be_stderr
126
+ puts splitter . to_io . fileno
122
127
end
123
128
124
129
# Detecting STDERR in a way that doesn't use a reference
You can’t perform that action at this time.
0 commit comments