/usr/share/doc/ruby-rspec-core/features/configuration/output_stream.feature is in ruby-rspec-core 3.7.0c1e0m0s1-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 | Feature: Custom output stream
Define a custom output stream (default `$stdout`). Aliases: `:output`,
`:out`.
```ruby
RSpec.configure { |c| c.output_stream = File.open('saved_output', 'w') }
```
Background:
Given a file named "spec/spec_helper.rb" with:
"""ruby
RSpec.configure { |c| c.output_stream = File.open('saved_output', 'w') }
"""
Scenario: Redirecting output
Given a file named "spec/example_spec.rb" with:
"""ruby
require 'spec_helper'
RSpec.describe "an example" do
it "passes" do
true
end
end
"""
When I run `rspec spec/example_spec.rb`
Then the file "saved_output" should contain "1 example, 0 failures"
|