-
-
Notifications
You must be signed in to change notification settings - Fork 756
/
text_formatter.feature
46 lines (40 loc) · 1.26 KB
/
text_formatter.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
Feature: text formatter
In order to easily see the result of running my specs
As an RSpec user
I want clear, concise, well-formatted output
Scenario: Backtrace formatting for failing specs in multiple files
Given a file named "string_spec.rb" with:
"""ruby
describe String do
it "has a failing example" do
"foo".reverse.should eq("ofo")
end
end
"""
And a file named "integer_spec.rb" with:
"""ruby
describe Integer do
it "has a failing example" do
(7 + 5).should eq(11)
end
end
"""
When I run `rspec integer_spec.rb string_spec.rb`
Then the backtrace-normalized output should contain:
"""
1) Integer has a failing example
Failure/Error: (7 + 5).should eq(11)
expected: 11
got: 12
(compared using ==)
# ./integer_spec.rb:3
"""
And the backtrace-normalized output should contain:
"""
2) String has a failing example
Failure/Error: "foo".reverse.should eq("ofo")
expected: "ofo"
got: "oof"
(compared using ==)
# ./string_spec.rb:3
"""