File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -16,17 +16,3 @@ def source_fixture(filename)
1616def source_fixture_base_directory
1717 @source_fixture_base_directory ||= File . dirname ( __FILE__ )
1818end
19-
20- # Taken from http://stackoverflow.com/questions/4459330/how-do-i-temporarily-redirect-stderr-in-ruby
21- def capture_stderr
22- # The output stream must be an IO-like object. In this case we capture it in
23- # an in-memory IO object so we can return the string value. You can assign any
24- # IO object here.
25- previous_stderr = $stderr
26- $stderr = StringIO . new
27- yield
28- $stderr. string
29- ensure
30- # Restore the previous value of stderr (typically equal to STDERR).
31- $stderr = previous_stderr
32- end
Original file line number Diff line number Diff line change 364364 it "has 16 source lines regardless of extra data in coverage array" do
365365 expect ( subject . lines . count ) . to eq ( 16 )
366366 end
367+
368+ it "does not output to stderr" do
369+ expect { subject . lines } . not_to output . to_stderr
370+ end
367371 end
368372
369373 context "A file that has inline branches" do
You can’t perform that action at this time.
0 commit comments