minitest 5.2.3 → 5.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +2 -2
- data/History.txt +6 -0
- data/lib/minitest.rb +1 -1
- data/lib/minitest/mock.rb +2 -2
- data/test/minitest/test_minitest_mock.rb +11 -0
- metadata +2 -2
- 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: 595796aaf004192153301e233836d6bef959d8ff
|
4
|
+
data.tar.gz: 2b88e68313e47c30fb0baefe95f9b111107717f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f9d24fe5cf14d032a0efdcbcf93cd57e30365603df256e912a6514ef1847ec9348d4471f085d7b2ca5aaad7ef81158494942e60ba08ff4dcaef486e43d756237
|
7
|
+
data.tar.gz: 0e9267cec4df14676655d54b209629d7ccd317f6de0cd7da9404d203b97d4a29f9c19f8cc6fe56fa4ce9af012ab0bccc65d733b417f2bd8759b33f1369efa7f7
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
�{
|
2
|
-
|
1
|
+
|��[�1]����1mc��MzE{+M��B#���C �S<�ueƸ�m'nߨN�XJw����Xƌ?3� �ҧo㥠ɏ���j�4�I���+Q���ٵ���]����"Me|Z�~��a�Y��_��yqܬ.�+ٸ
|
2
|
+
_~�N�'p:�Flj*H]�"�3%ڗT���2��/�O��ވ�]O��}LtXO��"&�+
|
data/History.txt
CHANGED
data/lib/minitest.rb
CHANGED
data/lib/minitest/mock.rb
CHANGED
@@ -109,7 +109,7 @@ module Minitest # :nodoc:
|
|
109
109
|
true
|
110
110
|
end
|
111
111
|
|
112
|
-
def method_missing(sym, *args) # :nodoc:
|
112
|
+
def method_missing(sym, *args, &block) # :nodoc:
|
113
113
|
unless @expected_calls.has_key?(sym) then
|
114
114
|
raise NoMethodError, "unmocked method %p, expected one of %p" %
|
115
115
|
[sym, @expected_calls.keys.sort_by(&:to_s)]
|
@@ -128,7 +128,7 @@ module Minitest # :nodoc:
|
|
128
128
|
|
129
129
|
if val_block then
|
130
130
|
raise MockExpectationError, "mocked method %p failed block w/ %p" %
|
131
|
-
[sym, args] unless val_block.call(args)
|
131
|
+
[sym, args] unless val_block.call(*args, &block)
|
132
132
|
|
133
133
|
# keep "verify" happy
|
134
134
|
@actual_calls[sym] << expected_call
|
@@ -265,6 +265,17 @@ class TestMinitestMock < Minitest::Test
|
|
265
265
|
assert mock.verify
|
266
266
|
end
|
267
267
|
|
268
|
+
def test_mock_block_is_passed_function_block
|
269
|
+
mock = MiniTest::Mock.new
|
270
|
+
block = proc { 'bar' }
|
271
|
+
mock.expect :foo, nil do |arg, &blk|
|
272
|
+
arg == 'foo' &&
|
273
|
+
blk == block
|
274
|
+
end
|
275
|
+
mock.foo 'foo', &block
|
276
|
+
assert mock.verify
|
277
|
+
end
|
278
|
+
|
268
279
|
def test_verify_fails_when_mock_block_returns_false
|
269
280
|
mock = Minitest::Mock.new
|
270
281
|
mock.expect :foo, nil do
|
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
|
+
version: 5.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Davis
|
@@ -29,7 +29,7 @@ cert_chain:
|
|
29
29
|
Y4evBVezr3SjXz08vPqRO5YRdO3zfeMT8gBjRqZjWJGMZ2lD4XNfrs7eky74CyZw
|
30
30
|
xx3n58i0lQkBE1EpKE0lFu/y
|
31
31
|
-----END CERTIFICATE-----
|
32
|
-
date: 2014-02-
|
32
|
+
date: 2014-02-26 00:00:00.000000000 Z
|
33
33
|
dependencies:
|
34
34
|
- !ruby/object:Gem::Dependency
|
35
35
|
name: rdoc
|
metadata.gz.sig
CHANGED
Binary file
|