minitest 5.4.1 → 5.4.2
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 +1 -3
- data/History.txt +7 -0
- data/README.txt +1 -0
- data/lib/minitest.rb +4 -2
- data/lib/minitest/assertions.rb +11 -10
- data/lib/minitest/test.rb +3 -1
- metadata +13 -13
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5d593a2496a45c79788b7c14d3653e0bbe390723
|
4
|
+
data.tar.gz: 5ff3bfb6b098f8049afa9b85d1da6d670aee4a5c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5e3b0dfaf0272031514f8f7d3c41f94e0a9d5f289dad4de1f5ea8073fa36b80926b950ef95ebf563740a32e60688147e02d7b83b37953ac4fa42b6b5c1a6ce3f
|
7
|
+
data.tar.gz: 9e61edb1a0d5adf522d6194acddeeafbe936081ef641b23f5b3ba0f2320246a207001f494244639a37b882ed7db3ebc1f7668b54e87605b739a0e2d005555288
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1,3 +1 @@
|
|
1
|
-
|
2
|
-
��*���Yib�6��
|
3
|
-
�������"�4��B�����}B5!�Ĩ%��2q�B��a������
|
1
|
+
<�/;?����4�6��F�L\W���ü��P�o���U�n%�k�AzA�k�^�E w����S���˝��Y��-k��M3���̸r��C�bbE�v`$2�~��㢝��庴d���6+o���"şN���%��T�s�XlW�Κ2�������OQ��w�!'��R;Z���6<�9��_��^�NG�����������zȋF�5���$���i�\*��ҷc�T�c�,�D��������/�`�N�y
|
data/History.txt
CHANGED
data/README.txt
CHANGED
@@ -424,6 +424,7 @@ minitest-around :: Around block for minitest. An alternative to
|
|
424
424
|
setup/teardown dance.
|
425
425
|
minitest-bang :: Adds support for RSpec-style let! to immediately
|
426
426
|
invoke let statements before each test.
|
427
|
+
minitest-bisect :: Helps you isolate and debug random test failures.
|
427
428
|
minitest-capistrano :: Assertions and expectations for testing
|
428
429
|
Capistrano recipes.
|
429
430
|
minitest-capybara :: Capybara matchers support for minitest unit and
|
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.4.
|
10
|
+
VERSION = "5.4.2" # :nodoc:
|
11
11
|
|
12
12
|
@@installed_at_exit ||= false
|
13
13
|
@@after_run = []
|
@@ -306,8 +306,10 @@ module Minitest
|
|
306
306
|
on_signal "INFO", handler, &block
|
307
307
|
end
|
308
308
|
|
309
|
+
SIGNALS = Signal.list
|
310
|
+
|
309
311
|
def self.on_signal name, action # :nodoc:
|
310
|
-
supported =
|
312
|
+
supported = SIGNALS[name]
|
311
313
|
|
312
314
|
old_trap = trap name do
|
313
315
|
old_trap.call if old_trap.respond_to? :call
|
data/lib/minitest/assertions.rb
CHANGED
@@ -1,4 +1,6 @@
|
|
1
1
|
require "rbconfig"
|
2
|
+
require "tempfile"
|
3
|
+
require 'stringio'
|
2
4
|
|
3
5
|
module Minitest
|
4
6
|
##
|
@@ -53,19 +55,18 @@ module Minitest
|
|
53
55
|
# comparison between the two.
|
54
56
|
|
55
57
|
def diff exp, act
|
56
|
-
require "tempfile"
|
57
|
-
|
58
58
|
expect = mu_pp_for_diff exp
|
59
59
|
butwas = mu_pp_for_diff act
|
60
60
|
result = nil
|
61
61
|
|
62
62
|
need_to_diff =
|
63
|
-
Minitest::Assertions.diff &&
|
64
63
|
(expect.include?("\n") ||
|
65
64
|
butwas.include?("\n") ||
|
66
65
|
expect.size > 30 ||
|
67
66
|
butwas.size > 30 ||
|
68
|
-
expect == butwas)
|
67
|
+
expect == butwas) &&
|
68
|
+
Minitest::Assertions.diff
|
69
|
+
|
69
70
|
|
70
71
|
return "Expected: #{mu_pp exp}\n Actual: #{mu_pp act}" unless
|
71
72
|
need_to_diff
|
@@ -122,9 +123,9 @@ module Minitest
|
|
122
123
|
# Fails unless +test+ is truthy.
|
123
124
|
|
124
125
|
def assert test, msg = nil
|
125
|
-
msg ||= "Failed assertion, no message given."
|
126
126
|
self.assertions += 1
|
127
127
|
unless test then
|
128
|
+
msg ||= "Failed assertion, no message given."
|
128
129
|
msg = msg.call if Proc === msg
|
129
130
|
raise Minitest::Assertion, msg
|
130
131
|
end
|
@@ -144,6 +145,8 @@ module Minitest
|
|
144
145
|
assert obj.empty?, msg
|
145
146
|
end
|
146
147
|
|
148
|
+
E = ""
|
149
|
+
|
147
150
|
##
|
148
151
|
# Fails unless <tt>exp == act</tt> printing the difference between
|
149
152
|
# the two, if possible.
|
@@ -157,7 +160,7 @@ module Minitest
|
|
157
160
|
# See also: Minitest::Assertions.diff
|
158
161
|
|
159
162
|
def assert_equal exp, act, msg = nil
|
160
|
-
msg = message(msg,
|
163
|
+
msg = message(msg, E) { diff exp, act }
|
161
164
|
assert exp == act, msg
|
162
165
|
end
|
163
166
|
|
@@ -399,8 +402,6 @@ module Minitest
|
|
399
402
|
def capture_io
|
400
403
|
_synchronize do
|
401
404
|
begin
|
402
|
-
require 'stringio'
|
403
|
-
|
404
405
|
captured_stdout, captured_stderr = StringIO.new, StringIO.new
|
405
406
|
|
406
407
|
orig_stdout, orig_stderr = $stdout, $stderr
|
@@ -482,11 +483,11 @@ module Minitest
|
|
482
483
|
##
|
483
484
|
# Returns a proc that will output +msg+ along with the default message.
|
484
485
|
|
485
|
-
def message msg = nil, ending =
|
486
|
+
def message msg = nil, ending = nil, &default
|
486
487
|
proc {
|
487
488
|
msg = msg.call.chomp(".") if Proc === msg
|
488
489
|
custom_message = "#{msg}.\n" unless msg.nil? or msg.to_s.empty?
|
489
|
-
"#{custom_message}#{default.call}#{ending}"
|
490
|
+
"#{custom_message}#{default.call}#{ending || "."}"
|
490
491
|
}
|
491
492
|
end
|
492
493
|
|
data/lib/minitest/test.rb
CHANGED
@@ -94,6 +94,8 @@ module Minitest
|
|
94
94
|
super
|
95
95
|
end
|
96
96
|
|
97
|
+
TEARDOWN_METHODS = %w{ before_teardown teardown after_teardown } # :nodoc:
|
98
|
+
|
97
99
|
##
|
98
100
|
# Runs a single test with setup/teardown hooks.
|
99
101
|
|
@@ -106,7 +108,7 @@ module Minitest
|
|
106
108
|
self.send self.name
|
107
109
|
end
|
108
110
|
|
109
|
-
|
111
|
+
TEARDOWN_METHODS.each do |hook|
|
110
112
|
capture_exceptions do
|
111
113
|
self.send hook
|
112
114
|
end
|
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.4.
|
4
|
+
version: 5.4.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -10,9 +10,9 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
13
|
+
MIIDPjCCAiagAwIBAgIBAjANBgkqhkiG9w0BAQUFADBFMRMwEQYDVQQDDApyeWFu
|
14
14
|
ZC1ydWJ5MRkwFwYKCZImiZPyLGQBGRYJemVuc3BpZGVyMRMwEQYKCZImiZPyLGQB
|
15
|
-
|
15
|
+
GRYDY29tMB4XDTE0MDkxNzIzMDcwN1oXDTE1MDkxNzIzMDcwN1owRTETMBEGA1UE
|
16
16
|
AwwKcnlhbmQtcnVieTEZMBcGCgmSJomT8ixkARkWCXplbnNwaWRlcjETMBEGCgmS
|
17
17
|
JomT8ixkARkWA2NvbTCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBALda
|
18
18
|
b9DCgK+627gPJkB6XfjZ1itoOQvpqH1EXScSaba9/S2VF22VYQbXU1xQXL/WzCkx
|
@@ -22,14 +22,14 @@ cert_chain:
|
|
22
22
|
qhtV7HJxNKuPj/JFH0D2cswvzznE/a5FOYO68g+YCuFi5L8wZuuM8zzdwjrWHqSV
|
23
23
|
gBEfoTEGr7Zii72cx+sCAwEAAaM5MDcwCQYDVR0TBAIwADALBgNVHQ8EBAMCBLAw
|
24
24
|
HQYDVR0OBBYEFEfFe9md/r/tj/Wmwpy+MI8d9k/hMA0GCSqGSIb3DQEBBQUAA4IB
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
25
|
+
AQAFoDJRokCQdxFfOrmsKX41KOFlU/zjrbDVM9hgB/Ur999M6OXGSi8FitXNtMwY
|
26
|
+
FVjsiAPeU7HaWVVcZkj6IhINelTkXsxgGz/qCzjHy3iUMuZWw36cS0fiWJ5rvH+e
|
27
|
+
hD7uXxJSFuyf1riDGI1aeWbQ74WMwvNstOxLUMiV5a1fzBhlxPqb537ubDjq/M/h
|
28
|
+
zPUFPVYeL5KjDHLCqI2FwIk2sEMOQgjpXHzl+3NlD2LUgUhHDMevmgVua0e2GT1B
|
29
|
+
xJcC6UN6NHMOVMyAXsr2HR0gRRx4ofN1LoP2KhXzSr8UMvQYlwPmE0N5GQv1b5AO
|
30
|
+
VpzF30vNaJK6ZT7xlIsIlwmH
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2014-
|
32
|
+
date: 2014-09-26 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: rdoc
|
@@ -51,14 +51,14 @@ dependencies:
|
|
51
51
|
requirements:
|
52
52
|
- - ~>
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '3.
|
54
|
+
version: '3.13'
|
55
55
|
type: :development
|
56
56
|
prerelease: false
|
57
57
|
version_requirements: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ~>
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '3.
|
61
|
+
version: '3.13'
|
62
62
|
description: |-
|
63
63
|
minitest provides a complete suite of testing facilities supporting
|
64
64
|
TDD, BDD, mocking, and benchmarking.
|
@@ -171,7 +171,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
171
171
|
version: '0'
|
172
172
|
requirements: []
|
173
173
|
rubyforge_project:
|
174
|
-
rubygems_version: 2.
|
174
|
+
rubygems_version: 2.4.1
|
175
175
|
signing_key:
|
176
176
|
specification_version: 4
|
177
177
|
summary: minitest provides a complete suite of testing facilities supporting TDD,
|
metadata.gz.sig
CHANGED
Binary file
|