minitest-heat 0.0.11 → 0.0.12

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: 7a2dd8d434e13e9719addb1a2afa9f25c751ca6e5712c752244afb1823ac4740
4
- data.tar.gz: 722f33b1145d79510f9007b54663198972c1ce4461a7a79c14a7bfdeb190721e
3
+ metadata.gz: d95ecb7dad79fef49909bf766fb8c428489a71a0a2a50f815e4f0e7b0dbe480b
4
+ data.tar.gz: f9e03a7fcb915c0f5f0e74eb20fb7cec2d65de7e4d73f6130b61d50d48d8fafc
5
5
  SHA512:
6
- metadata.gz: 955b848541141572e94aeff4b02586253f70db8e313af111e54b91c3e8a64c7c44c0f0f90c672f699f9296dc5f691ea04c7852eb948f6ab680173b8261512eee
7
- data.tar.gz: 9c3085267bea53a6734a085c982fd8348442715036ccf2b636de9c997f3dc14662e25a709faab1b4425ffb46ceeb109f43672336fadf0bca7c4e0cbbccd0463c
6
+ metadata.gz: d9903cc0ea5edb14005ddcef3027ea09414100013f3e829989670a238bce2c2bd02b0227835632658022b82fff658d86dcab07aa58c7ddecdfb2452408258f97
7
+ data.tar.gz: 2ea218a55b33d8ba6fdb41f8aa3ef7d07443537e482a2a995a7aad2c01fc952c22135263739aa0963d9e0e88a153ffd146ac32e4a9979c5a32ccf218391f66cf
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- minitest-heat (0.0.11)
4
+ minitest-heat (0.0.12)
5
5
  minitest
6
6
 
7
7
  GEM
@@ -99,9 +99,9 @@ module Minitest
99
99
  :skipped
100
100
  elsif !passed?
101
101
  :failure
102
- elsif painful?
102
+ elsif passed? && painful?
103
103
  :painful
104
- elsif slow?
104
+ elsif passed? && slow?
105
105
  :slow
106
106
  else
107
107
  :success
@@ -79,7 +79,7 @@ module Minitest
79
79
  end
80
80
 
81
81
  def headline_tokens
82
- [[issue.type, label(issue)], spacer_token, [:default, test_name(issue)]]
82
+ [label_token(issue), spacer_token, [:default, test_name(issue)]]
83
83
  end
84
84
 
85
85
  def test_name(issue)
@@ -93,24 +93,20 @@ module Minitest
93
93
  end
94
94
  end
95
95
 
96
- def label(issue) # rubocop:disable Metrics
97
- if issue.error? && issue.in_test?
98
- # When the exception came out of the test itself, that's a different kind of exception
99
- # that really only indicates there's a problem with the code in the test. It's kind of
100
- # between an error and a test.
101
- 'Broken Test'
102
- elsif issue.error?
103
- 'Error'
104
- elsif issue.skipped?
105
- 'Skipped'
106
- elsif issue.painful?
107
- 'Passed but Very Slow'
108
- elsif issue.slow?
109
- 'Passed but Slow'
110
- elsif !issue.passed?
111
- 'Failure'
112
- else
113
- 'Success'
96
+ def label_token(issue)
97
+ [issue.type, issue_label(issue.type)]
98
+ end
99
+
100
+ def issue_label(issue_type)
101
+ case issue_type
102
+ when :error then 'Error'
103
+ when :broken then 'Broken Test'
104
+ when :failure then 'Failure'
105
+ when :skipped then 'Skipped'
106
+ when :slow then 'Passed but Slow'
107
+ when :painful then 'Passed but Very Slow'
108
+ when :passed then 'Success'
109
+ else 'Unknown'
114
110
  end
115
111
  end
116
112
 
@@ -58,7 +58,7 @@ module Minitest
58
58
  [:muted, ':'],
59
59
  [:default, location.line_number],
60
60
  [:muted, " in #{location.container}"],
61
- [:muted, " #{Output::SYMBOLS[:arrow]} `location.source_code.line.strip`"],
61
+ [:muted, " #{Output::SYMBOLS[:arrow]} `#{location.source_code.line.strip}`"],
62
62
  ]
63
63
  end
64
64
 
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Minitest
4
4
  module Heat
5
- VERSION = '0.0.11'
5
+ VERSION = '0.0.12'
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: minitest-heat
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.11
4
+ version: 0.0.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garrett Dimon