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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f47bbe779a4b3440e7c036e3950509ca805ee78f
4
- data.tar.gz: 3429ba5b8203bda3155ea91883a13d24bf85c00a
3
+ metadata.gz: 595796aaf004192153301e233836d6bef959d8ff
4
+ data.tar.gz: 2b88e68313e47c30fb0baefe95f9b111107717f4
5
5
  SHA512:
6
- metadata.gz: ffc5e96a1536d5376e860dc633303588809f3b1a72abf60ff66da8e443b6003e202453916c3c6a7847a9403ce614b96df3048097fcbe3abcd19765ba455887d7
7
- data.tar.gz: 41cf81a654cd874c79c0169f7d9f07bd906e3a5f252b53af2c70efd8dd67e43bb063024ca52fd4d288401c9b662cbf1e3631a16fe7abaa3f7710fef885f34e98
6
+ metadata.gz: f9d24fe5cf14d032a0efdcbcf93cd57e30365603df256e912a6514ef1847ec9348d4471f085d7b2ca5aaad7ef81158494942e60ba08ff4dcaef486e43d756237
7
+ data.tar.gz: 0e9267cec4df14676655d54b209629d7ccd317f6de0cd7da9404d203b97d4a29f9c19f8cc6fe56fa4ce9af012ab0bccc65d733b417f2bd8759b33f1369efa7f7
Binary file
data.tar.gz.sig CHANGED
@@ -1,2 +1,2 @@
1
- �{ &mlH����:�e��x gm1��w���fF��"j��×PW��Լ�>�-��!r��
2
- ���C�~l M�ĒMWb=�{zt|��s ���=����ɏ�T~m�-������T a�����G���0���[�=�#!��*��t��Ʉ�X]G�(l)��%_g�H���3eɗ4�BK�Z(� *Ǟ��2�:���;_j��o�����
1
+ |��[1]����1mc ��MzE{+M��B#���C �S<�ueƸ�m'nߨN�XJw����Xƌ?3� �ҧo㥠ɏ���j�4�I���+Q���ٵ���]����"Me|Z�~��a�Y��_��y qܬ.�+ٸ
2
+ _~�N'p:�Flj*H]�"3%ڗT���2��/֋�O��ވ�]O��}LtXO��"&�+
@@ -1,3 +1,9 @@
1
+ === 5.3.0 / 2014-02-25
2
+
3
+ * 1 minor enhancement:
4
+
5
+ * Mocked methods can take a block to verify state. Seattle.rb 12 bday present from ernie! Thanks!!
6
+
1
7
  === 5.2.3 / 2014-02-10
2
8
 
3
9
  * 1 bug fix:
@@ -7,7 +7,7 @@ require "minitest/parallel"
7
7
  # :include: README.txt
8
8
 
9
9
  module Minitest
10
- VERSION = "5.2.3" # :nodoc:
10
+ VERSION = "5.3.0" # :nodoc:
11
11
 
12
12
  @@installed_at_exit ||= false
13
13
  @@after_run = []
@@ -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.2.3
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-11 00:00:00.000000000 Z
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