forked from troessner/reek
-
Notifications
You must be signed in to change notification settings - Fork 0
/
reports.feature
40 lines (34 loc) · 1.56 KB
/
reports.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
@reports
Feature: Correctly formatted reports
In order to get the most out of reek
As a developer
I want to be able to parse reek's output simply and consistently
Scenario: two reports run together with indented smells
When I run reek spec/samples/two_smelly_files/*.rb
Then it fails with exit status 2
And it reports:
"""
spec/samples/two_smelly_files/dirty_one.rb -- 6 warnings:
Dirty has the variable name '@s' (Uncommunicative Name)
Dirty#a calls @s.title multiple times (Duplication)
Dirty#a calls puts(@s.title) multiple times (Duplication)
Dirty#a has the name 'a' (Uncommunicative Name)
Dirty#a/block has the variable name 'x' (Uncommunicative Name)
Dirty#a/block/block is nested (Nested Iterators)
spec/samples/two_smelly_files/dirty_two.rb -- 6 warnings:
Dirty has the variable name '@s' (Uncommunicative Name)
Dirty#a calls @s.title multiple times (Duplication)
Dirty#a calls puts(@s.title) multiple times (Duplication)
Dirty#a has the name 'a' (Uncommunicative Name)
Dirty#a/block has the variable name 'x' (Uncommunicative Name)
Dirty#a/block/block is nested (Nested Iterators)
"""
Scenario: good files show headers consecutively
When I run reek spec/samples/three_clean_files/*.rb
Then it succeeds
And it reports:
"""
spec/samples/three_clean_files/clean_one.rb -- 0 warnings
spec/samples/three_clean_files/clean_three.rb -- 0 warnings
spec/samples/three_clean_files/clean_two.rb -- 0 warnings
"""