pludoni_rspec 0.20 → 0.21

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 897a5ac1427f82428f620f7d860ae26c1f2d17ba654f656baa646f26d42876fc
4
- data.tar.gz: 6e3bd7d8bdf3292ea15c071115d09c5b1caa2f96d9a505088d649f7efcf2b7f0
3
+ metadata.gz: 8264156b506de2cefeb9a3f3dc2682123c8797aaf91ec8d1cb341d45be4ee39f
4
+ data.tar.gz: 1942311a089bacedb057ad15d29d5636fdd92f7948626d292b5d8060a81ae5f6
5
5
  SHA512:
6
- metadata.gz: 06ffcb0a2cd67c7cc7af74cf96c10eb18a575c59e23b22300fb3031426179cc2e866d6afb9cc943badb5ce46f3b7297de902b09afaa3160982bf0f44cee9d783
7
- data.tar.gz: f72de2ea77aaf4f182a376f6ab35a9bcec5f16128c9ddd1778f79a0511945b7cb3bf06545b69e053858fc60b24fad8812a04f42379a92dfadaad0874213ee0d6
6
+ metadata.gz: 6d9cb307e8ccb8c32f04b20e64bb5e0ef0844893b87b30dc41424d80cdf06412bef0c27b520ea821203bbefa24b169c4e52f7995d4638ec59caae96bfadd9524
7
+ data.tar.gz: 527abc9cbc47d6f8587ee73d2ca465bff2c56d73e4bea4d7a7936aa432179035851603e29c99ced4c75539403e039d552bee7164c15eb4d9e8c0c7adfc3bb7d1
@@ -36,7 +36,11 @@ class EnhancedDocumentationFormatter < RSpec::Core::Formatters::DocumentationFor
36
36
  end
37
37
 
38
38
  def duration(example)
39
- time = example.metadata[:execution_result][:run_time]
39
+ time = if example.respond_to?(:execution_result)
40
+ example.execution_result.run_time
41
+ else
42
+ example.metadata[:execution_result][:run_time]
43
+ end
40
44
  if time < self.class.threshold_for_good
41
45
  RSpec::Core::Formatters::ConsoleCodes.wrap("#{(time * 1000).round}ms", :black)
42
46
  elsif time > self.class.threshold_for_bad
@@ -1,3 +1,3 @@
1
1
  module PludoniRspec
2
- VERSION = "0.20".freeze
2
+ VERSION = "0.21".freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pludoni_rspec
3
3
  version: !ruby/object:Gem::Version
4
- version: '0.20'
4
+ version: '0.21'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Wienert