minitest-reporters 1.1.3 → 1.1.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: a9c9e2598ba34e48a68673e2bfdbab2b63bcdf85
4
- data.tar.gz: 48fe15b97bea95c41f7cc2921fa6c8d0412e4a37
3
+ metadata.gz: 8e292139a737294885c26dbb205df39673aada0a
4
+ data.tar.gz: 5b10fb975661a7edb04d02e1502e6f23a406b4f1
5
5
  SHA512:
6
- metadata.gz: b564d9f76facdc1f990ebc5a1c18a5af0b8506b8cc6a6e15220c0e2c7340348f663cc10943de96f0ab56e10eec3898025f836099a08e425aa7674c978c425580
7
- data.tar.gz: 8cc758211dd597018fb8d58fdffadcd063145e921b18015c1e5f58d9d8696c3eded2d48afb7e7cf3b6703ec4ad83386c5645adc34013e77aa5e07a9a9c443085
6
+ metadata.gz: d2b354f6cd9f35782f35ab6406b561b1331ec3c6ff9de78c967d9280ca99819706c69a9d34461adae317429ffec8615c948e07821b62d4ece234cf25c4ad7801
7
+ data.tar.gz: eacb9124d652d3c501f8b0caaaf141940848132ff8147e696ce8b4834f8278c85eab1a216c19ba07b14a04660d768cec6706aad283dab2506e542f7c19fe58e0
@@ -204,9 +204,9 @@ module Minitest
204
204
  def total_time_to_hms
205
205
  return ('%.2fs' % total_time) if total_time < 1
206
206
 
207
- hours = total_time / (60 * 60)
208
- minutes = ((total_time / 60) % 60).to_s.rjust(2,'0')
209
- seconds = (total_time % 60).to_s.rjust(2,'0')
207
+ hours = (total_time / (60 * 60)).round
208
+ minutes = ((total_time / 60) % 60).round.to_s.rjust(2,'0')
209
+ seconds = (total_time % 60).round.to_s.rjust(2,'0')
210
210
 
211
211
  "#{ hours }h#{ minutes }m#{ seconds }s"
212
212
  end
@@ -118,10 +118,11 @@ module Minitest
118
118
 
119
119
  def filename_for(suite)
120
120
  file_counter = 0
121
- filename = "TEST-#{suite.to_s[0..240].gsub(/[^a-zA-Z0-9]+/, '-')}.xml" #restrict max filename length, to be kind to filesystems
121
+ suite_name = suite.to_s[0..240].gsub(/[^a-zA-Z0-9]+/, '-') # restrict max filename length, to be kind to filesystems
122
+ filename = "TEST-#{suite_name}.xml"
122
123
  while File.exists?(File.join(@reports_path, filename)) # restrict number of tries, to avoid infinite loops
123
124
  file_counter += 1
124
- filename = "TEST-#{suite}-#{file_counter}.xml"
125
+ filename = "TEST-#{suite_name}-#{file_counter}.xml"
125
126
  puts "Too many duplicate files, overwriting earlier report #{filename}" and break if file_counter >= 99
126
127
  end
127
128
  File.join(@reports_path, filename)
@@ -1,5 +1,5 @@
1
1
  module Minitest
2
2
  module Reporters
3
- VERSION = '1.1.3'
3
+ VERSION = '1.1.4'
4
4
  end
5
5
  end
@@ -13,3 +13,9 @@ describe 'something/other' do
13
13
  1.must_equal 1
14
14
  end
15
15
  end
16
+
17
+ describe 'something/other' do
18
+ it 'does something else' do
19
+ 1.must_equal 2
20
+ end
21
+ 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.1.3
4
+ version: 1.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Kern
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-10-11 00:00:00.000000000 Z
11
+ date: 2015-10-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: minitest