rubygem-flexmock/rubygem-flexmock-2.3.6-workaround-relax-error-message.patch
chen-jan b442c66bc2 fix build error by upgrading to ruby3
(cherry picked from commit 167f372e457c0b817620573165b7a92c49ed5bda)
2022-03-23 10:48:04 +08:00

13 lines
633 B
Diff

--- flexmock-2.3.6/test/partial_mock_test.rb.workaround 2021-01-24 02:36:13.468840410 +0900
+++ flexmock-2.3.6/test/partial_mock_test.rb 2021-01-24 03:03:55.748278701 +0900
@@ -621,7 +621,8 @@
exception = assert_raises(NameError) do
obj.mocked_method
end
- assert_equal "undefined method `does_not_exist' for #{obj}", exception.message
+ assert(/undefined method `does_not_exist' for #<#<Class:/ === exception.message,
+ "expected #{exception.message} to match /undefined method `does_not_exist' for #<#<Class:/")
end
def test_it_checks_whether_mocks_are_forbidden_before_forwarding_the_call