1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
|
Description: Patch tests to work with Mocha 1.7.0
Latest versions of Mocha combined the reset_instance method with teardown
method. Modifying the tests to reflect this change.
Author: Balasankar C <balasankarc@debian.org>
Origin: https://github.com/freerange/mocha/commit/89eeb1c1373cf32f038bc74f51500a0d5c4a2f11
Last-Update: 2018-09-23
---
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
--- a/test/unit/assert_received_test.rb
+++ b/test/unit/assert_received_test.rb
@@ -11,7 +11,7 @@
include Mocha::API
def teardown
- Mockery.reset_instance
+ Mockery.teardown
end
class FakeMock
--- a/test/unit/have_received_test.rb
+++ b/test/unit/have_received_test.rb
@@ -10,7 +10,7 @@
include Mocha
def teardown
- Mockery.reset_instance
+ Mockery.teardown
end
def test_passes_if_invocation_exists
--- a/test/unit/mockery_test.rb
+++ b/test/unit/mockery_test.rb
@@ -21,7 +21,7 @@
def test_should_expire_mockery_instance_cache
mockery_1 = Mockery.instance
- Mockery.reset_instance
+ Mockery.teardown
mockery_2 = Mockery.instance
assert_not_same mockery_1, mockery_2
end
|