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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 40f6f7cf08acd616e7dc6f4c871ff6c00246334242962195e98b7d9bc66f25ec
4
- data.tar.gz: 3893baa02e5de01980fc3f09e6a76633dbefb23504296724217b1f18ce8e778b
3
+ metadata.gz: 02a30026af9171664e0344a6c0283ff4cf02900ba159017ad0d3f96638b4088b
4
+ data.tar.gz: 60c7028ab4b359a6bc397da85eb5ec6f2cbbac636c2da0b903f5f95ae6bfe237
5
5
  SHA512:
6
- metadata.gz: 6709b833360f19d90759645729c9023f5050ec5d364ef81efd83ca0b8ec278e58075e1a3d282690634ea87d1c8548b33556e82943427fe226b52a961509c904d
7
- data.tar.gz: 19e2a3d39a3782c308c226d4899173aaaee7796973289b113663eb8e1acf1d9a8276676c51261b2a2a932d8449fb0d4bc581af853971c4ee436f7e8e8d5f6a50
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.1
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-07 00:00:00.000000000 Z
11
+ date: 2020-05-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: tesults