minitest-reporters 1.0.0.beta2 → 1.0.0.beta3

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
  SHA1:
3
- metadata.gz: d29f66cacfc2618ff267a26326808e8ebf8009c3
4
- data.tar.gz: 8ffeda735736d1e8cc9588ecafb1f6f986f26bb7
3
+ metadata.gz: 2c95e6d4842a85ba418854eed033f3a3ad7c60a8
4
+ data.tar.gz: 7bac122561b747d70d191f6baacedc8737232b5b
5
5
  SHA512:
6
- metadata.gz: 6af32d999d36de42e02a9f9485248b31dfd6221c8912e1cee1dce0e73f2cb0c2c29dbe901e255df55f618005e025904fc291e9eaf47d8797de3599db89396f6a
7
- data.tar.gz: 214460714a2be0b21c2e0effcadcd1f641b6022e3dd773e1f608d93562121bb0785266d4b35cba2cc610b9d8a612fc4e6e173dc76193994ee766717b4c0832df
6
+ metadata.gz: 142b546f61bfbc7e98752dc390fe1c50674c5b33f4c5bd774f5076b351583040485348ea29125f9401ff5349f70d0b7265b8db2511b0654c43c2b96f04048792
7
+ data.tar.gz: 9902f5a929ce18f82eab997ed37c435d18a46c8264a99ccff09334b49d6168bfbd93682f07892a7d37871fbe6490f65ea6f5d29faf43787063b0e162a576a6cf
@@ -47,15 +47,25 @@ module Minitest
47
47
  def result(test)
48
48
  if test.error?
49
49
  :error
50
- elsif test.failure
51
- :fail
52
50
  elsif test.skipped?
53
51
  :skip
52
+ elsif test.failure
53
+ :fail
54
54
  else
55
55
  :pass
56
56
  end
57
57
  end
58
58
 
59
+ def print_colored_status(test)
60
+ if test.passed?
61
+ print(green { pad_mark( result(test).to_s.upcase ) })
62
+ elsif test.skipped?
63
+ print(yellow { pad_mark( result(test).to_s.upcase ) })
64
+ else
65
+ print(red { pad_mark( result(test).to_s.upcase ) })
66
+ end
67
+ end
68
+
59
69
  def total_time
60
70
  super || Time.now - start_time
61
71
  end
@@ -39,7 +39,7 @@ module Minitest
39
39
  super
40
40
  if (test.skipped? && @detailed_skip) || test.failure
41
41
  wipe
42
- print(yellow { result(test).to_s.upcase })
42
+ print_colored_status(test)
43
43
  print_test_with_time(test)
44
44
  puts
45
45
  print_info(test.failure, test.error?) if test.failure
@@ -30,7 +30,7 @@ module Minitest
30
30
  def record(test)
31
31
  super
32
32
  print pad_test(test.name)
33
- print(green { pad_mark( result(test).to_s.upcase ) })
33
+ print_colored_status(test)
34
34
  print(" (%.2fs)" % test.time)
35
35
  puts
36
36
  if test.failure
@@ -1,5 +1,5 @@
1
1
  module Minitest
2
2
  module Reporters
3
- VERSION = '1.0.0.beta2'
3
+ VERSION = '1.0.0.beta3'
4
4
  end
5
5
  end
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.0.beta2
4
+ version: 1.0.0.beta3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kern
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-10-11 00:00:00.000000000 Z
11
+ date: 2013-11-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest