Sha256: 17dab7e20028eec67365d6c7a30f90cbc9592ff568f218ce51882b117fed2649

Contents?: true

Size: 1.16 KB

Versions: 48

Compression:

Stored size: 1.16 KB

Contents

Feature: Configurable colors

  RSpec allows you to configure the terminal colors used in the text formatters.

  * `failure_color`: Color used when tests fail (default: `:red`)
  * `success_color`: Color used when tests pass (default: `:green`)
  * `pending_color`: Color used when tests are pending (default: `:yellow`)
  * `fixed_color`: Color used when a pending block inside an example passes, but was expected to fail (default: `:blue`)
  * `detail_color`: Color used for miscellaneous test details (default: `:cyan`)

  Colors are normally specified as symbols. Options are `:black`, `:red`,
  `:green`, `:yellow`, `:blue`, `:magenta`, `:cyan`, and `:white`.

  @ansi
  Scenario: Customizing the failure color
    Given a file named "custom_failure_color_spec.rb" with:
      """ruby
      RSpec.configure do |config|
        config.failure_color = :magenta
        config.tty = true
        config.color = true
      end

      describe "failure" do
        it "fails and uses the custom color" do
          expect(2).to eq(4)
        end
      end
      """
      When I run `rspec custom_failure_color_spec.rb --format progress`
      Then the failing example is printed in magenta

Version data entries

48 entries across 48 versions & 12 rubygems

Version Path
vagrant-unbundled-2.2.7.0 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/formatters/configurable_colors.feature
vagrant-unbundled-1.9.5.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/formatters/configurable_colors.feature
vagrant-unbundled-1.9.1.1 vendor/bundle/ruby/2.4.0/gems/rspec-core-2.14.8/features/formatters/configurable_colors.feature
vagrant-unbundled-1.8.5.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/formatters/configurable_colors.feature
vagrant-unbundled-1.8.5.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/formatters/configurable_colors.feature
vagrant-unbundled-1.8.4.2 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/formatters/configurable_colors.feature
vagrant-unbundled-1.8.4.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/formatters/configurable_colors.feature
vagrant-unbundled-1.8.1.1 vendor/bundle/ruby/2.3.0/gems/rspec-core-2.14.8/features/formatters/configurable_colors.feature
vagrant-cloudstack-1.1.0 vendor/bundle/gems/rspec-core-2.14.8/features/formatters/configurable_colors.feature
judge-2.0.5 vendor/bundle/ruby/2.1.0/gems/rspec-core-2.13.0/features/formatters/configurable_colors.feature
rspec-core-2.99.2 features/formatters/configurable_colors.feature
dxruby_rp5-0.0.4 spec/vendor/rspec-core-2.14.7/features/formatters/configurable_colors.feature
rspec-core-2.99.1 features/formatters/configurable_colors.feature
rspec-core-2.99.0 features/formatters/configurable_colors.feature
rspec-core-2.99.0.rc1 features/formatters/configurable_colors.feature
rspec-core-2.14.8 features/formatters/configurable_colors.feature
rspec-core-3.0.0.beta2 features/formatters/configurable_colors.feature
rspec-core-2.99.0.beta2 features/formatters/configurable_colors.feature
mango-0.8.0 vendor/bundler/ruby/2.1.0/gems/rspec-core-2.14.7/features/formatters/configurable_colors.feature
mango-0.7.1 vendor/bundler/ruby/2.0.0/gems/rspec-core-2.14.7/features/formatters/configurable_colors.feature