minitest-reporters 1.0.2 → 1.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/README.md +2 -2
- data/lib/minitest/reporters/progress_reporter.rb +22 -27
- data/lib/minitest/reporters/spec_reporter.rb +1 -1
- data/lib/minitest/reporters/version.rb +1 -1
- data/lib/minitest/reporters.rb +5 -1
- data/minitest-reporters.gemspec +1 -1
- metadata +11 -5
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 05d45de95aebdd43a75b94d51b6cf93e267150f2
|
4
|
+
data.tar.gz: d30f23b6c4eb9583a691eb2fddbebc3464d37ede
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d5d479974d16b0e3763647e9174131178ac3e537a18f740d4e3de3801add54971517880262479beb5c29728bdd321f4a7677df2d7c15218d3b97e41d0e72169d
|
7
|
+
data.tar.gz: cfd92d468e6603a4d7a2b70781d00973a76848bc88dd6d17c466ef460a2beb6466b1b80ea2a3de5e76944a4dc88637ee523e71f43ca958fb9b17fd6bbd1cb140
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
# minitest-reporters - create customizable Minitest output formats [![Build Status](https://secure.travis-ci.org/
|
1
|
+
# minitest-reporters - create customizable Minitest output formats [![Build Status](https://secure.travis-ci.org/kern/minitest-reporters.png)](http://travis-ci.org/kern/minitest-reporters)
|
2
2
|
|
3
3
|
Death to haphazard monkey-patching! Extend Minitest through simple hooks.
|
4
4
|
|
@@ -44,7 +44,7 @@ Options can be passed to these reporters at construction-time, e.g. to force
|
|
44
44
|
color output from `DefaultReporter`:
|
45
45
|
|
46
46
|
```ruby
|
47
|
-
Minitest::Reporters.use! [Minitest::Reporters::
|
47
|
+
Minitest::Reporters.use! [Minitest::Reporters::DefaultReporter.new(:color => true)]
|
48
48
|
```
|
49
49
|
|
50
50
|
## Screenshots ##
|
@@ -1,5 +1,5 @@
|
|
1
1
|
require 'ansi/code'
|
2
|
-
require '
|
2
|
+
require 'ruby-progressbar'
|
3
3
|
|
4
4
|
module Minitest
|
5
5
|
module Reporters
|
@@ -14,31 +14,34 @@ module Minitest
|
|
14
14
|
include RelativePosition
|
15
15
|
include ANSI::Code
|
16
16
|
|
17
|
-
|
17
|
+
PROGRESS_MARK = '='
|
18
18
|
|
19
19
|
def initialize(options = {})
|
20
20
|
super
|
21
21
|
@detailed_skip = options.fetch(:detailed_skip, true)
|
22
22
|
|
23
|
-
@progress =
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
23
|
+
@progress = ProgressBar.create({
|
24
|
+
total: total_count,
|
25
|
+
starting_at: count,
|
26
|
+
progress_mark: green(PROGRESS_MARK),
|
27
|
+
remainder_mark: ' ',
|
28
|
+
format: ' %C/%c: [%B] %p%% %a, %e',
|
29
|
+
autostart: false
|
30
|
+
})
|
29
31
|
end
|
30
32
|
|
31
33
|
def start
|
32
34
|
super
|
33
35
|
puts 'Started'
|
34
36
|
puts
|
37
|
+
@progress.start
|
35
38
|
show
|
36
39
|
end
|
37
40
|
|
38
41
|
def record(test)
|
39
42
|
super
|
40
43
|
if (test.skipped? && @detailed_skip) || test.failure
|
41
|
-
|
44
|
+
print "\e[0m\e[1000D\e[K"
|
42
45
|
print_colored_status(test)
|
43
46
|
print_test_with_time(test)
|
44
47
|
puts
|
@@ -46,10 +49,10 @@ module Minitest
|
|
46
49
|
puts
|
47
50
|
end
|
48
51
|
|
49
|
-
if test.skipped? && color !=
|
50
|
-
self.color =
|
52
|
+
if test.skipped? && color != "red"
|
53
|
+
self.color = "yellow"
|
51
54
|
elsif test.failure
|
52
|
-
self.color =
|
55
|
+
self.color = "red"
|
53
56
|
end
|
54
57
|
|
55
58
|
show
|
@@ -57,9 +60,8 @@ module Minitest
|
|
57
60
|
|
58
61
|
def report
|
59
62
|
super
|
60
|
-
@progress.
|
63
|
+
@progress.finish
|
61
64
|
|
62
|
-
wipe
|
63
65
|
puts
|
64
66
|
puts('Finished in %.5fs' % total_time)
|
65
67
|
print('%d tests, %d assertions, ' % [count, assertions])
|
@@ -73,29 +75,22 @@ module Minitest
|
|
73
75
|
def show
|
74
76
|
return if count == 0
|
75
77
|
|
76
|
-
@progress.
|
77
|
-
|
78
|
-
:done => count,
|
79
|
-
:total => total_count,
|
80
|
-
}, true)
|
81
|
-
end
|
82
|
-
|
83
|
-
def wipe
|
84
|
-
@progress.wipe
|
78
|
+
@progress.total = total_count
|
79
|
+
@progress.increment
|
85
80
|
end
|
86
81
|
|
87
82
|
def print_test_with_time(test)
|
88
|
-
puts [test.name, test.class, total_time
|
89
|
-
print(" %s#%s (%.2fs)
|
83
|
+
puts [test.name, test.class, total_time].inspect
|
84
|
+
print(" %s#%s (%.2fs)" % [test.name, test.class, total_time])
|
90
85
|
end
|
91
86
|
|
92
87
|
def color
|
93
|
-
@color ||=
|
88
|
+
@color ||= "green"
|
94
89
|
end
|
95
90
|
|
96
91
|
def color=(color)
|
97
92
|
@color = color
|
98
|
-
@progress.
|
93
|
+
@progress.progress_mark = send(color, PROGRESS_MARK)
|
99
94
|
end
|
100
95
|
end
|
101
96
|
end
|
data/lib/minitest/reporters.rb
CHANGED
data/minitest-reporters.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-reporters
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alexander Kern
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-04-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: ruby-progressbar
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - '>='
|
@@ -103,7 +103,6 @@ extra_rdoc_files: []
|
|
103
103
|
files:
|
104
104
|
- .gitignore
|
105
105
|
- .ruby-gemset
|
106
|
-
- .ruby-version
|
107
106
|
- .travis.yml
|
108
107
|
- .yardopts
|
109
108
|
- Gemfile
|
@@ -157,4 +156,11 @@ rubygems_version: 2.0.14
|
|
157
156
|
signing_key:
|
158
157
|
specification_version: 4
|
159
158
|
summary: Create customizable Minitest output formats
|
160
|
-
test_files:
|
159
|
+
test_files:
|
160
|
+
- test/gallery/bad_test.rb
|
161
|
+
- test/gallery/good_test.rb
|
162
|
+
- test/integration/fixtures/junit_filename_bug_example_test.rb
|
163
|
+
- test/integration/reporters/junit_reporter_test.rb
|
164
|
+
- test/test_helper.rb
|
165
|
+
- test/unit/minitest/extensible_backtrace_filter_test.rb
|
166
|
+
- test/unit/minitest/reporters_test.rb
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.0.0-p353
|