minitest 5.11.3 → 5.14.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -64,8 +64,6 @@ class TestMinitestMock < Minitest::Test
64
64
  end
65
65
 
66
66
  def test_mock_args_does_not_raise
67
- skip "non-opaque use of ==" if maglev?
68
-
69
67
  arg = Minitest::Mock.new
70
68
  mock = Minitest::Mock.new
71
69
  mock.expect(:foo, nil, [arg])
@@ -362,7 +360,7 @@ end
362
360
  require "minitest/metametameta"
363
361
 
364
362
  class TestMinitestStub < Minitest::Test
365
- parallelize_me!
363
+ # Do not parallelize since we're calling stub on class methods
366
364
 
367
365
  def setup
368
366
  super
@@ -374,7 +372,7 @@ class TestMinitestStub < Minitest::Test
374
372
 
375
373
  def teardown
376
374
  super
377
- assert_equal @assertion_count, @tc.assertions
375
+ assert_equal @assertion_count, @tc.assertions if self.passed?
378
376
  end
379
377
 
380
378
  class Time
@@ -593,6 +591,18 @@ class TestMinitestStub < Minitest::Test
593
591
  end
594
592
  end
595
593
 
594
+ class Keywords
595
+ def self.args req, kw1:, kw2:24
596
+ [req, kw1, kw2]
597
+ end
598
+ end
599
+
600
+ def test_stub_callable_keyword_args
601
+ Keywords.stub :args, ->(*args, **kws) { [args, kws] } do
602
+ @tc.assert_equal [["woot"], { kw1: 42 }], Keywords.args("woot", kw1: 42)
603
+ end
604
+ end
605
+
596
606
  def test_stub_callable_block_5 # from tenderlove
597
607
  @assertion_count += 1
598
608
  Foo.stub5 :blocking, Bar.new do