Sha256: d75e60d096137bca393e5f1ccdd10c528e0f9c1f9c5cb694869f9bae910f463e

Contents?: true

Size: 1.92 KB

Versions: 47

Compression:

Stored size: 1.92 KB

Contents

Feature: show_failures_in_pending_blocks

  Use the show_failures_in_pending_blocks option to run the code in pending blocks while keeping the tests pending.

    RSpec.configure { |c| c.show_failures_in_pending_blocks = true }

  Background:
    Given a file named "spec/spec_helper.rb" with:
      """ruby
      RSpec.configure {|c| c.show_failures_in_pending_blocks = true}
      """

  Scenario: by default, code in pending examples is not exercised
    Given a file named "spec/example_spec.rb" with:
      """ruby
      describe "fails" do
        pending "code will not be exercised" do
          fail
        end
      end
      """
    When I run `rspec spec/example_spec.rb`
    Then the output should not contain "Failure/Error: pending { fail }"

  Scenario: by default, code in pending blocks inside examples is not exercised
    Given a file named "spec/example_spec.rb" with:
      """ruby
      describe "fails" do
        it "code will not be exercised" do
          pending { fail }
        end
      end
      """
    When I run `rspec spec/example_spec.rb`
    Then the output should not contain "Failure/Error: pending { fail }"

  Scenario: when turned on, pending code blocks inside examples are exercised
    Given a file named "spec/example_spec.rb" with:
      """ruby
      require "spec_helper"
      describe "fails" do
        it "code will be exercised" do
          pending { fail }
        end
      end
      """
    When I run `rspec spec/example_spec.rb`
    Then the output should contain "Failure/Error: pending { fail }"

  Scenario: when turned on, code inside pending examples is not exercised
    Given a file named "spec/example_spec.rb" with:
      """ruby
      require "spec_helper"
      describe "fails" do
        pending "code will not be exercised" do
          fail
        end
      end
      """
    When I run `rspec spec/example_spec.rb`
    Then the output should not contain "Failure/Error: pending { fail }"

Version data entries

47 entries across 47 versions & 12 rubygems

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