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 +4 -4
- data/lib/pludoni_rspec/formatter.rb +5 -1
- data/lib/pludoni_rspec/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8264156b506de2cefeb9a3f3dc2682123c8797aaf91ec8d1cb341d45be4ee39f
|
4
|
+
data.tar.gz: 1942311a089bacedb057ad15d29d5636fdd92f7948626d292b5d8060a81ae5f6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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
|