minitest-bender 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +7 -1
- data/README.md +2 -3
- data/lib/minitest-bender/results/base.rb +21 -2
- data/lib/minitest-bender/states/raising.rb +1 -1
- data/lib/minitest-bender/version.rb +1 -1
- data/lib/minitest/bender.rb +0 -1
- data/lib/minitest_bender.rb +2 -0
- data/minitest-bender.gemspec +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 07494f6c231ff2de7a071fd6927d4e4084593d5db749d9f29eab51274e536322
|
4
|
+
data.tar.gz: 6e0a7fdc255cd9a6effbbe701739ebd850ae50d003aac8aaafdab7d154cddcae
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7391d8c06ad48f013e43ecad0bc5504973a447d4668b9e23cffb45cb19820895226b1c1db38af78ecf8fb5e97d91cfd47c753e363f86bd035f0cd3d7b1be0e8a
|
7
|
+
data.tar.gz: 6a0b1d44d864fe758e15ffce2182e9b579285cafcd72c11800856ef2fab08d159cd76dc221abf80fa71c88e0a8f4e6268e6170507541dc66ff08fee9b96d8518
|
data/CHANGELOG.md
CHANGED
@@ -6,6 +6,11 @@ All notable changes to this project will be documented in this file. This projec
|
|
6
6
|
|
7
7
|
* Your contribution here!
|
8
8
|
|
9
|
+
## [0.0.3][] (2019-06-09)
|
10
|
+
|
11
|
+
* Fixed running time format of slow tests
|
12
|
+
* Fixed results grouping by class/context when using minitest >= 5.11
|
13
|
+
|
9
14
|
## [0.0.2][] (2017-06-20)
|
10
15
|
|
11
16
|
* Fixed version declaration: Ruby >= 2.0.0 is required
|
@@ -16,4 +21,5 @@ All notable changes to this project will be documented in this file. This projec
|
|
16
21
|
|
17
22
|
[Semver]: http://semver.org
|
18
23
|
[Unreleased]: https://github.com/eugeniobruno/minitest-bender/compare/v0.0.2...HEAD
|
19
|
-
[0.0.
|
24
|
+
[0.0.3]: https://github.com/eugeniobruno/minitest-bender/compare/v0.0.2...v0.0.3
|
25
|
+
[0.0.2]: https://github.com/eugeniobruno/minitest-bender/compare/v0.0.1...v0.0.2
|
data/README.md
CHANGED
@@ -2,7 +2,6 @@
|
|
2
2
|
|
3
3
|
[![Gem Version](https://badge.fury.io/rb/minitest-bender.svg)](https://badge.fury.io/rb/minitest-bender)
|
4
4
|
[![Code Climate](https://codeclimate.com/github/eugeniobruno/minitest-bender.svg)](https://codeclimate.com/github/eugeniobruno/minitest-bender)
|
5
|
-
[![Dependency Status](https://gemnasium.com/eugeniobruno/minitest-bender.svg)](https://gemnasium.com/eugeniobruno/minitest-bender)
|
6
5
|
|
7
6
|
My own Minitest reporter, without blackjack but with a hook.
|
8
7
|
|
@@ -24,7 +23,7 @@ Or install it yourself as:
|
|
24
23
|
|
25
24
|
## Usage
|
26
25
|
|
27
|
-
Require this plugin
|
26
|
+
Require this plugin right after Minitest:
|
28
27
|
|
29
28
|
```ruby
|
30
29
|
require 'minitest/autorun'
|
@@ -35,7 +34,7 @@ That's it! The next time you run your tests, a new report format will be used in
|
|
35
34
|
|
36
35
|
## Features
|
37
36
|
|
38
|
-
Based on [minitest-colorin](https://github.com/gabynaiman/minitest-colorin/), the minitest-bender reporter
|
37
|
+
Based on [minitest-colorin](https://github.com/gabynaiman/minitest-colorin/), the minitest-bender reporter offers you colored output including:
|
39
38
|
|
40
39
|
* Status, running time, name and message for each test/expectation, grouped by class/context
|
41
40
|
* Details of skips, failures and errors in three different sections, with diffs, backtraces and commands to rerun each single test
|
@@ -10,7 +10,12 @@ module MinitestBender
|
|
10
10
|
end
|
11
11
|
|
12
12
|
def context
|
13
|
-
@context ||=
|
13
|
+
@context ||=
|
14
|
+
if minitest_result.respond_to?(:klass) # minitest >= 5.11
|
15
|
+
minitest_result.klass
|
16
|
+
else
|
17
|
+
minitest_result.class.name
|
18
|
+
end.gsub('::', ' > ')
|
14
19
|
end
|
15
20
|
|
16
21
|
def header
|
@@ -47,7 +52,21 @@ module MinitestBender
|
|
47
52
|
end
|
48
53
|
|
49
54
|
def formatted_time
|
50
|
-
|
55
|
+
time_in_s = time
|
56
|
+
time_with_unit =
|
57
|
+
case time_in_s
|
58
|
+
when 0...1
|
59
|
+
sprintf('%.0fms ', time_in_s * 1000)
|
60
|
+
when 1...10
|
61
|
+
sprintf('%.2fs ', time_in_s)
|
62
|
+
when 10...100
|
63
|
+
sprintf('%.1fs ', time_in_s)
|
64
|
+
when 100...10000
|
65
|
+
sprintf('%.0fs ', time_in_s)
|
66
|
+
else
|
67
|
+
sprintf('%.0fs', time_in_s)
|
68
|
+
end
|
69
|
+
Colorin.grey_700(time_with_unit.rjust(6))
|
51
70
|
end
|
52
71
|
|
53
72
|
def rerun_command
|
@@ -12,7 +12,7 @@ module MinitestBender
|
|
12
12
|
def summary_message(results)
|
13
13
|
filtered_results = only_with_this_state(results)
|
14
14
|
return '' if filtered_results.empty?
|
15
|
-
colored("#{filtered_results.size} raised
|
15
|
+
colored("#{filtered_results.size} raised an error")
|
16
16
|
end
|
17
17
|
|
18
18
|
def test_location(result)
|
data/lib/minitest/bender.rb
CHANGED
data/lib/minitest_bender.rb
CHANGED
data/minitest-bender.gemspec
CHANGED
@@ -7,7 +7,7 @@ require 'minitest-bender/version'
|
|
7
7
|
Gem::Specification.new do |spec|
|
8
8
|
spec.name = 'minitest-bender'
|
9
9
|
spec.version = MinitestBender::VERSION
|
10
|
-
spec.date = '
|
10
|
+
spec.date = '2019-06-09'
|
11
11
|
spec.authors = ['Eugenio Bruno']
|
12
12
|
spec.email = ['eugeniobruno@gmail.com']
|
13
13
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest-bender
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eugenio Bruno
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2019-06-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: minitest
|
@@ -135,7 +135,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
135
135
|
version: '0'
|
136
136
|
requirements: []
|
137
137
|
rubyforge_project:
|
138
|
-
rubygems_version: 2.
|
138
|
+
rubygems_version: 2.7.7
|
139
139
|
signing_key:
|
140
140
|
specification_version: 4
|
141
141
|
summary: My own Minitest reporter, without blackjack but with a hook.
|