Sha256: 4b8c51ac6d815d91e7cafa0bd8b76186dcdf90980597d6f40fda801523c774db

Contents?: true

Size: 833 Bytes

Versions: 5

Compression:

Stored size: 833 Bytes

Contents

Feature: Custom formatters

  Scenario: a legacy custom formatter
    Given a file named "custom_formatter.rb" with:
      """ruby
      require "rspec/legacy_formatters"
      require "rspec/core/formatters/base_text_formatter"

      class CustomFormatter < RSpec::Core::Formatters::BaseTextFormatter
        def initialize(output)
          super(output)
        end

        def example_started(proxy)
          output << "example: " << proxy.description
        end
      end
      """
    And a file named "example_spec.rb" with:
      """ruby
      describe "my group" do
        specify "my example" do
        end
      end
      """
    When I run `rspec example_spec.rb --require ./custom_formatter.rb --format CustomFormatter`
    Then the output should contain "example: my example"
    And  the exit status should be 0

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
rspec-legacy_formatters-1.0.2 features/custom_formatter.feature
vagrant-packet-0.1.1 vendor/bundle/ruby/2.4.0/gems/rspec-legacy_formatters-1.0.1/features/custom_formatter.feature
rspec-legacy_formatters-1.0.1 features/custom_formatter.feature
rspec-legacy_formatters-1.0.0 features/custom_formatter.feature
rspec-legacy_formatters-1.0.0.rc1 features/custom_formatter.feature