minitest 5.5.0 → 5.5.1
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/History.txt +6 -0
- data/lib/minitest.rb +8 -2
- data/lib/minitest/assertions.rb +9 -9
- data/lib/minitest/benchmark.rb +3 -0
- data/lib/minitest/parallel.rb +22 -3
- data/lib/minitest/test.rb +1 -1
- metadata +2 -2
- metadata.gz.sig +1 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 71d62e9fd6a176451296c021e8e03f9f6e1cd30a
|
4
|
+
data.tar.gz: 45c4772118f1edd8f574d85cffc5827116b62f35
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6b90e0a01a98ae2134536b0a9079bc5cc2c5f106bdf6c536cc5f84f8ad16cd1963f2e28cf0922d1089d757dea16bc9ae0881f100a07d7d201e651e1957499af0
|
7
|
+
data.tar.gz: 4ef102bf6a4123bea77619773a106a193c21755eaaba7237a0db923cc26e0b0f6aabe4844d86bf8ec98c7b97c225ab68e797705d2de8939542bb09a0f39d448f
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/History.txt
CHANGED
data/lib/minitest.rb
CHANGED
@@ -7,7 +7,7 @@ require "minitest/parallel"
|
|
7
7
|
# :include: README.txt
|
8
8
|
|
9
9
|
module Minitest
|
10
|
-
VERSION = "5.5.
|
10
|
+
VERSION = "5.5.1" # :nodoc:
|
11
11
|
ENCS = "".respond_to? :encoding # :nodoc:
|
12
12
|
|
13
13
|
@@installed_at_exit ||= false
|
@@ -291,6 +291,12 @@ module Minitest
|
|
291
291
|
end
|
292
292
|
end
|
293
293
|
|
294
|
+
##
|
295
|
+
# Runs a single method and has the reporter record the result.
|
296
|
+
# This was considered internal API but is factored out of run so
|
297
|
+
# that subclasses can specialize the running of an individual
|
298
|
+
# test. See Minitest::ParallelTest::ClassMethods for an example.
|
299
|
+
|
294
300
|
def self.run_one_method klass, method_name, reporter
|
295
301
|
reporter.record Minitest.run_one_method(klass, method_name)
|
296
302
|
end
|
@@ -308,7 +314,7 @@ module Minitest
|
|
308
314
|
on_signal "INFO", handler, &block
|
309
315
|
end
|
310
316
|
|
311
|
-
SIGNALS = Signal.list
|
317
|
+
SIGNALS = Signal.list # :nodoc:
|
312
318
|
|
313
319
|
def self.on_signal name, action # :nodoc:
|
314
320
|
supported = SIGNALS[name]
|
data/lib/minitest/assertions.rb
CHANGED
@@ -145,7 +145,7 @@ module Minitest
|
|
145
145
|
assert obj.empty?, msg
|
146
146
|
end
|
147
147
|
|
148
|
-
E = ""
|
148
|
+
E = "" # :nodoc:
|
149
149
|
|
150
150
|
##
|
151
151
|
# Fails unless <tt>exp == act</tt> printing the difference between
|
@@ -402,17 +402,17 @@ module Minitest
|
|
402
402
|
def capture_io
|
403
403
|
_synchronize do
|
404
404
|
begin
|
405
|
-
|
405
|
+
captured_stdout, captured_stderr = StringIO.new, StringIO.new
|
406
406
|
|
407
|
-
|
408
|
-
|
407
|
+
orig_stdout, orig_stderr = $stdout, $stderr
|
408
|
+
$stdout, $stderr = captured_stdout, captured_stderr
|
409
409
|
|
410
|
-
|
410
|
+
yield
|
411
411
|
|
412
|
-
|
413
|
-
|
414
|
-
|
415
|
-
|
412
|
+
return captured_stdout.string, captured_stderr.string
|
413
|
+
ensure
|
414
|
+
$stdout = orig_stdout
|
415
|
+
$stderr = orig_stderr
|
416
416
|
end
|
417
417
|
end
|
418
418
|
end
|
data/lib/minitest/benchmark.rb
CHANGED
data/lib/minitest/parallel.rb
CHANGED
@@ -1,8 +1,19 @@
|
|
1
1
|
module Minitest
|
2
2
|
module Parallel
|
3
|
+
|
4
|
+
##
|
5
|
+
# The engine used to run multiple tests in parallel.
|
6
|
+
|
3
7
|
class Executor
|
8
|
+
|
9
|
+
##
|
10
|
+
# The size of the pool of workers.
|
11
|
+
|
4
12
|
attr_reader :size
|
5
13
|
|
14
|
+
##
|
15
|
+
# Create a parallel test executor of with +size+ workers.
|
16
|
+
|
6
17
|
def initialize size
|
7
18
|
@size = size
|
8
19
|
@queue = Queue.new
|
@@ -18,8 +29,16 @@ module Minitest
|
|
18
29
|
}
|
19
30
|
end
|
20
31
|
|
32
|
+
##
|
33
|
+
# Add a job to the queue
|
34
|
+
|
21
35
|
def << work; @queue << work; end
|
22
36
|
|
37
|
+
##
|
38
|
+
# Shuts down the pool of workers by signalling them to quit and
|
39
|
+
# waiting for them all to finish what they're currently working
|
40
|
+
# on.
|
41
|
+
|
23
42
|
def shutdown
|
24
43
|
size.times { @queue << nil }
|
25
44
|
@pool.each(&:join)
|
@@ -27,13 +46,13 @@ module Minitest
|
|
27
46
|
end
|
28
47
|
|
29
48
|
module Test
|
30
|
-
def _synchronize; Test.io_lock.synchronize { yield }; end
|
49
|
+
def _synchronize; Test.io_lock.synchronize { yield }; end # :nodoc:
|
31
50
|
|
32
51
|
module ClassMethods
|
33
|
-
def run_one_method klass, method_name, reporter
|
52
|
+
def run_one_method klass, method_name, reporter # :nodoc:
|
34
53
|
Minitest.parallel_executor << [klass, method_name, reporter]
|
35
54
|
end
|
36
|
-
def test_order; :parallel; end
|
55
|
+
def test_order; :parallel; end # :nodoc:
|
37
56
|
end
|
38
57
|
end
|
39
58
|
end
|
data/lib/minitest/test.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: minitest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.5.
|
4
|
+
version: 5.5.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
29
29
|
xJcC6UN6NHMOVMyAXsr2HR0gRRx4ofN1LoP2KhXzSr8UMvQYlwPmE0N5GQv1b5AO
|
30
30
|
VpzF30vNaJK6ZT7xlIsIlwmH
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date:
|
32
|
+
date: 2015-01-10 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: rdoc
|
metadata.gz.sig
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
|
2
|
-
���?vX_�o���M�8��_tpe|�5E4R,r���_2P��iR ܦ��<}��px��:�Y�:ħm DgB��aƲ,�ǥ|��=�|��%�Isd^X�3�r^JV>8)�p� \��C_�?��8�[�Wr���G�������p�[߷ 5�mC�9 �\���%�z�j
|
1
|
+
jCG1]��k8݃@*�Z��x�751��Ͱ~�he�u�qp�ڢ]�E%db�_��E[p�;��`�|��Kd����*��S��ء�c�2B�y0fډ�nA."4A�{�Z���p�[טSi) `B�?2t����x]��U��x��Ԏ������|�nD%2W����.S,-���Ay,4��6%Ye����'���`��S�.N:��;a=�"]5���[́���ݴ^�y��C���lKU�s*�'5/lʙ}
|