rspec-rotten 0.0.2 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +13 -5
- data/lib/rspec/rotten/configuration.rb +9 -1
- data/lib/rspec/rotten/formatters/rotten_report_formatter.rb +0 -2
- data/lib/rspec/rotten/version.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1c5537b0480910e34c07c01322778ea4c73e26c1
|
4
|
+
data.tar.gz: d91a062851068131912f32f0dc3bda38558fbf93
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6ca006fa2999c6a2efc5ac57e16040b6997eac9f2ac6f42e6ba4c1b8519a2a6863562441d0f648e1dd187256aa0e7035e010ef19b436149665f23d38a624393f
|
7
|
+
data.tar.gz: 1c5e285dc14b4454253dd4663e3d464ec03d4965fd7bfa6764a07cb9d30552d213850919bc0cedf1e1ac1990dad7bfe4067c9fad4bf98d2731ced0e094916454
|
data/README.md
CHANGED
@@ -40,30 +40,38 @@ test runs, and, most importantly, _time period after which specs will be conside
|
|
40
40
|
"rotten"_, given they didn't change status(failed/passed/became pending):
|
41
41
|
|
42
42
|
```ruby
|
43
|
-
#
|
43
|
+
# spec/support/rspec-rotten.rb
|
44
44
|
Rspec::Rotten::Configuration.configure do |config|
|
45
45
|
config.results_file = Rails.root.join('output.json')
|
46
46
|
config.time_to_rotten = 1.year
|
47
47
|
end
|
48
|
-
```
|
49
48
|
|
50
|
-
|
49
|
+
# register custom formatter with RSpec
|
50
|
+
Rspec::Rotten::Configuration.register_formatter
|
51
|
+
```
|
52
|
+
The line above will take over default rspec formatter,
|
53
|
+
so you will have to register it again:
|
51
54
|
|
52
55
|
```ruby
|
53
56
|
# spec/rails_helper.rb
|
54
57
|
RSpec.configure do |config|
|
55
58
|
...
|
56
|
-
config.add_formatter(Rspec::Rotten::Formatters::
|
59
|
+
config.add_formatter(Rspec::Rotten::Formatters::ProgressFormatter)
|
57
60
|
...
|
58
61
|
end
|
59
62
|
```
|
63
|
+
OR just add this line to the `.rspec` (file with rspec default run options):
|
64
|
+
|
65
|
+
```
|
66
|
+
-f p
|
67
|
+
```
|
60
68
|
|
61
69
|
### Step 3
|
62
70
|
|
63
71
|
Run **the entire suite** to genreate initial spec report:
|
64
72
|
|
65
73
|
```
|
66
|
-
|
74
|
+
rspec spec/
|
67
75
|
```
|
68
76
|
_**NOTE:**_ This will create the report that will reflect the status of your specs,
|
69
77
|
and will be updated every time you run specs. It's recommended to check this file
|
@@ -1,7 +1,9 @@
|
|
1
|
+
require 'singleton'
|
2
|
+
|
1
3
|
module Rspec
|
2
4
|
module Rotten
|
3
5
|
class Configuration
|
4
|
-
include Singleton
|
6
|
+
include ::Singleton
|
5
7
|
|
6
8
|
class << self
|
7
9
|
attr_accessor :results_file, :time_to_rotten
|
@@ -9,6 +11,12 @@ module Rspec
|
|
9
11
|
def configure
|
10
12
|
yield self
|
11
13
|
end
|
14
|
+
|
15
|
+
def register_formatter
|
16
|
+
RSpec.configure do |config|
|
17
|
+
config.add_formatter(Rspec::Rotten::Formatters::RottenReportFormatter)
|
18
|
+
end
|
19
|
+
end
|
12
20
|
end
|
13
21
|
end
|
14
22
|
end
|
data/lib/rspec/rotten/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec-rotten
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Bagreev
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-09-
|
11
|
+
date: 2015-09-21 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -100,3 +100,4 @@ signing_key:
|
|
100
100
|
specification_version: 4
|
101
101
|
summary: Detects rotten specs
|
102
102
|
test_files: []
|
103
|
+
has_rdoc:
|