forked from rspec/rspec-core
/
regression_tests.feature
80 lines (68 loc) · 2.64 KB
/
regression_tests.feature
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Feature: Regression tests for legacy custom formatters
Background:
Given a file named "spec/passing_and_failing_spec.rb" with:
"""ruby
RSpec.describe "Some examples" do
it "passes" do
expect(1).to eq(1)
end
it "fails" do
expect(1).to eq(2)
end
context "nested" do
it "passes" do
expect(1).to eq(1)
end
it "fails" do
expect(1).to eq(2)
end
end
end
"""
And a file named "spec/pending_spec.rb" with:
"""ruby
RSpec.describe "Some pending examples" do
context "pending" do
it "is reported as pending" do
pending { expect(1).to eq(2) }
end
it "is reported as failing" do
pending { expect(1).to eq(1) }
end
end
end
"""
@wip @announce
Scenario: Use fuubar formatter
When I run `rspec --format Fuubar`
Then the output should contain "Progress: |============"
And the output should contain "6 examples, 3 failures, 1 pending"
And the output should contain "The Fuubar formatter uses the deprecated formatter interface"
But the output should not contain any error backtraces
Scenario: Use rspec-instafail formatter
When I run `rspec --format RSpec::Instafail`
Then the output should contain "6 examples, 3 failures, 1 pending"
And the output should contain "The RSpec::Instafail formatter uses the deprecated formatter interface"
But the output should not contain any error backtraces
Scenario: Use rspec-extra-formatters JUnit formatter
When I run `rspec --require rspec-extra-formatters --format JUnitFormatter`
Then the output should contain:
"""
<testsuite errors="0" failures="3" skipped="1" tests="6"
"""
And the output should contain "The JUnitFormatter formatter uses the deprecated formatter interface"
But the output should not contain any error backtraces
@wip @announce
Scenario: Use rspec-extra-formatters Tap formatter
When I run `rspec --require rspec-extra-formatters --format TapFormatter`
Then the output should contain "TAP version 13"
And the output should contain "The TapFormatter formatter uses the deprecated formatter interface"
But the output should not contain any error backtraces
@wip @announce
Scenario: Use rspec-spinner formatter
When I run `rspec --require rspec_spinner --format RspecSpinner::Spinner`
Then the output should contain "TBD"
@wip @announce
Scenario: Use nyancat formatter
When I run `rspec --format NyanCatFormatter`
Then the output should contain "TBD"