PageRenderTime 16ms CodeModel.GetById 1ms app.highlight 10ms RepoModel.GetById 2ms app.codeStats 0ms

/vendor/bundle/jruby/2.1/gems/rspec-core-2.14.8/features/configuration/show_failures_in_pending_blocks.feature

https://github.com/delowong/logstash
Gherkin Specification | 61 lines | 54 code | 7 blank | 0 comment | 2 complexity | 7e3c31a02a216f41891aa3d78ed05443 MD5 | raw file
 1Feature: show_failures_in_pending_blocks
 2
 3  Use the show_failures_in_pending_blocks option to run the code in pending blocks while keeping the tests pending.
 4
 5    RSpec.configure { |c| c.show_failures_in_pending_blocks = true }
 6
 7  Background:
 8    Given a file named "spec/spec_helper.rb" with:
 9      """ruby
10      RSpec.configure {|c| c.show_failures_in_pending_blocks = true}
11      """
12
13  Scenario: by default, code in pending examples is not exercised
14    Given a file named "spec/example_spec.rb" with:
15      """ruby
16      describe "fails" do
17        pending "code will not be exercised" do
18          fail
19        end
20      end
21      """
22    When I run `rspec spec/example_spec.rb`
23    Then the output should not contain "Failure/Error: pending { fail }"
24
25  Scenario: by default, code in pending blocks inside examples is not exercised
26    Given a file named "spec/example_spec.rb" with:
27      """ruby
28      describe "fails" do
29        it "code will not be exercised" do
30          pending { fail }
31        end
32      end
33      """
34    When I run `rspec spec/example_spec.rb`
35    Then the output should not contain "Failure/Error: pending { fail }"
36
37  Scenario: when turned on, pending code blocks inside examples are exercised
38    Given a file named "spec/example_spec.rb" with:
39      """ruby
40      require "spec_helper"
41      describe "fails" do
42        it "code will be exercised" do
43          pending { fail }
44        end
45      end
46      """
47    When I run `rspec spec/example_spec.rb`
48    Then the output should contain "Failure/Error: pending { fail }"
49
50  Scenario: when turned on, code inside pending examples is not exercised
51    Given a file named "spec/example_spec.rb" with:
52      """ruby
53      require "spec_helper"
54      describe "fails" do
55        pending "code will not be exercised" do
56          fail
57        end
58      end
59      """
60    When I run `rspec spec/example_spec.rb`
61    Then the output should not contain "Failure/Error: pending { fail }"