rspec-rotten 0.0.2 → 0.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 8baf4e11c797e50c69cd91a3f187f3822dbfb7d9
4
- data.tar.gz: 1f1eb1f40760ccd5145abe0021ee322b2cac70c0
3
+ metadata.gz: 1c5537b0480910e34c07c01322778ea4c73e26c1
4
+ data.tar.gz: d91a062851068131912f32f0dc3bda38558fbf93
5
5
  SHA512:
6
- metadata.gz: baed89376e63e2dde843531bd0f389b31483965dc17b68eb5e3ccab4c583cbb55cf4f4dc3b4d0738036b80f8829802fe1c7b38856c33a44e88f4a39dac2e0662
7
- data.tar.gz: b47adb41ae5f03bda358ad5781d71991a6e93f9f2af3e988ad3f8c91a56ec5009bad6b993e2022eba787fc6042751b2416d1d7a1a39174c4e43c21062125018a
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
- # config/initializers/rspec-rotten.rb
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
- Also add this line to RSpec config in spec_helper/rails_helper:
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::RottenReportFormatter)
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
- rake spec
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
@@ -43,8 +43,6 @@ module Rspec
43
43
  end
44
44
  end
45
45
 
46
- # write into a file
47
- # generate a report into STDOUT what specs haven't failed for a year
48
46
  def close(notification)
49
47
  @store.save
50
48
  @output << @store.notify_rotten if @store.rotten.any?
@@ -1,5 +1,5 @@
1
1
  module Rspec
2
2
  module Rotten
3
- VERSION = "0.0.2"
3
+ VERSION = "0.0.4"
4
4
  end
5
5
  end
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.2
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-13 00:00:00.000000000 Z
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: