Sha256: 62adf6f0fe32279eacfbb36883660cd8ad4ff2d8f82f24f01912037508c01405

Contents?: true

Size: 725 Bytes

Versions: 12

Compression:

Stored size: 725 Bytes

Contents

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"

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
opal-rspec-1.1.0.alpha3 rspec-core/upstream/features/configuration/output_stream.feature
opal-rspec-1.1.0.alpha2 rspec-core/upstream/features/configuration/output_stream.feature
opal-rspec-1.1.0.alpha1 rspec-core/upstream/features/configuration/output_stream.feature
opal-rspec-1.0.0 rspec-core/upstream/features/configuration/output_stream.feature
opal-rspec-1.0.0.alpha1 rspec-core/upstream/features/configuration/output_stream.feature
opal-rspec-0.8.0 rspec-core/upstream/features/configuration/output_stream.feature
opal-rspec-0.8.0.alpha3 rspec-core/upstream/features/configuration/output_stream.feature
opal-rspec-0.8.0.alpha2 rspec-core/upstream/features/configuration/output_stream.feature
opal-rspec-0.8.0.alpha1 rspec-core/upstream/features/configuration/output_stream.feature
opal-rspec-0.7.1 rspec-core/upstream/features/configuration/output_stream.feature
opal-rspec-0.7.0 rspec-core/upstream/features/configuration/output_stream.feature
opal-rspec-0.7.0.rc.2 rspec-core/upstream/features/configuration/output_stream.feature