rspec_tesults_formatter 1.0.1 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rspec_tesults_formatter.rb +14 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 02a30026af9171664e0344a6c0283ff4cf02900ba159017ad0d3f96638b4088b
|
4
|
+
data.tar.gz: 60c7028ab4b359a6bc397da85eb5ec6f2cbbac636c2da0b903f5f95ae6bfe237
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 843da58d0942071fbcc8832f095fd0cb33b3896bacda5a6a820c0af42dac719c94b731a50286d8eaccf04a515738118c92bc85e39024c61f70da91a9dfab4412
|
7
|
+
data.tar.gz: af0138d0206582685fffcc4a21646e88aef60f066f9c7acd19b77691d59bb24bb4b85fa280c7dfa9af1ee21e921f92ee6b890ef7ffbd87b1ccd213c350861e06
|
@@ -1,7 +1,7 @@
|
|
1
1
|
require 'tesults'
|
2
2
|
|
3
3
|
class TesultsFormatter
|
4
|
-
RSpec::Core::Formatters.register self, :example_finished, :dump_summary
|
4
|
+
RSpec::Core::Formatters.register self, :example_started, :example_finished, :dump_summary
|
5
5
|
|
6
6
|
def filesForCase(suite, name)
|
7
7
|
files = []
|
@@ -72,6 +72,16 @@ class TesultsFormatter
|
|
72
72
|
:cases => []
|
73
73
|
}
|
74
74
|
}
|
75
|
+
|
76
|
+
@starttimes = {}
|
77
|
+
end
|
78
|
+
|
79
|
+
def example_started(notification)
|
80
|
+
if (@disabled == true)
|
81
|
+
return
|
82
|
+
end
|
83
|
+
example = notification.example
|
84
|
+
@starttimes[example.id] = (Time.now.to_f * 1000).to_i
|
75
85
|
end
|
76
86
|
|
77
87
|
def example_finished(notification)
|
@@ -105,7 +115,9 @@ class TesultsFormatter
|
|
105
115
|
:desc => desc,
|
106
116
|
:suite => suite,
|
107
117
|
:reason => reason,
|
108
|
-
:files => filesForCase(suite, example.description)
|
118
|
+
:files => filesForCase(suite, example.description),
|
119
|
+
:start => @starttimes[example.id],
|
120
|
+
:end => (Time.now.to_f * 1000).to_i
|
109
121
|
})
|
110
122
|
|
111
123
|
#@output.puts name + ": " + result
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rspec_tesults_formatter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ajeet Dhaliwal
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: tesults
|