minitest-json-reporter 0.1.4 → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/minitest/json_reporter_plugin.rb +18 -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: 83ca1abb1bdcf181277b04e12369144e57a31da2e3c2a487a46519c14e9b4c45
|
4
|
+
data.tar.gz: f5d2a7f0e240f6fe1d8bd8c6a90263b569d7276e00efed75f22658f415e15f3c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13dd86c13ea0f46b6cfa8cea08bcabe12eb2c471145c6f2b33f3710fecf4e1c92fdf299c1059beb8474b96f8d991593af448eb696c0f03b5f7523c07795bdbf7
|
7
|
+
data.tar.gz: b33b614beb37fcc2c5eff0ef4a8d518dedcb7ed990b64b622a7f29d3314caf5b413ba02641460a2fe65e05e0b4a1ac284e40a3c4557e1a9a976f432ffb7a6587
|
data/Gemfile.lock
CHANGED
@@ -16,14 +16,19 @@ module Minitest
|
|
16
16
|
end
|
17
17
|
|
18
18
|
class JsonReporter < AbstractReporter
|
19
|
-
attr_accessor :io, :results
|
19
|
+
attr_accessor :io, :results, :assertions, :failures
|
20
20
|
|
21
21
|
def initialize(options)
|
22
22
|
@io = options[:io]
|
23
23
|
@results = []
|
24
|
+
@assertions = 0
|
25
|
+
@failures = 0
|
24
26
|
end
|
25
27
|
|
26
28
|
def record(result)
|
29
|
+
self.assertions += result.assertions
|
30
|
+
self.failures += result.failures.size
|
31
|
+
|
27
32
|
line = result.source_location[-1]
|
28
33
|
failure = result.failures[0]
|
29
34
|
|
@@ -41,7 +46,18 @@ module Minitest
|
|
41
46
|
end
|
42
47
|
|
43
48
|
def report
|
44
|
-
|
49
|
+
io.write(
|
50
|
+
JSON.dump(
|
51
|
+
{
|
52
|
+
examples: results,
|
53
|
+
statistics: {
|
54
|
+
assertions: assertions,
|
55
|
+
failures: failures
|
56
|
+
}
|
57
|
+
}
|
58
|
+
)
|
59
|
+
)
|
60
|
+
# results.each { |result| io.write "\n#{result}" }
|
45
61
|
end
|
46
62
|
end
|
47
63
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-json-reporter
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Wei Zhe Heng
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-
|
11
|
+
date: 2022-11-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: debug
|