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

Commit

Permalink
Update the FIXME comment now that stream.clone is handled
Browse files Browse the repository at this point in the history
  • Loading branch information
nevinera committed Aug 18, 2024
1 parent 3fbe8a0 commit 8fc34dc
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/rspec/matchers/built_in/output.rb
Original file line number Diff line number Diff line change
Expand Up @@ -235,10 +235,9 @@ def capture(block)
# we're testing `is_a?(File)` in such an obnoxious way).
inner_matcher = stream.to_io.is_a?(File)

# FIXME: stream.clone isn't sufficient right now - the StdErrSplitter
# clones with the same stream, and reopening the stream on either of
# them effectively updates both. Which means that the ensure-reopen
# further down doesn't really do anything currently.
# Careful here - the StdErrSplitter is what is being cloned; we're
# relying on the implemented clone method of that class (in
# rspec-support) to actually clone the File for ensure-reopen.
original_stream = stream.clone

captured_stream = Tempfile.new(name)
Expand Down

0 comments on commit 8fc34dc

Please sign in to comment.