Make testsuite compatible with ruby34 formatting change

This commit is contained in:
Mamoru TASAKA 2024-11-18 16:00:07 +09:00
commit 6b03bd8028
2 changed files with 24 additions and 1 deletions

View file

@ -0,0 +1,13 @@
diff -urp flexmock.orig/test/partial_mock_test.rb flexmock/test/partial_mock_test.rb
--- flexmock.orig/test/partial_mock_test.rb 2024-11-18 15:38:57.625597258 +0900
+++ flexmock/test/partial_mock_test.rb 2024-11-18 15:44:56.469851634 +0900
@@ -633,7 +633,7 @@ class TestStubbing < Minitest::Test
exception = assert_raises(NameError) do
obj.mocked_method
end
- assert_match /undefined method `does_not_exist' for/, exception.message
+ assert_match /undefined method [`']does_not_exist' for/, exception.message
end
def test_it_checks_whether_mocks_are_forbidden_before_forwarding_the_call
Only in flexmock/test: partial_mock_test.rb~

View file

@ -3,13 +3,15 @@
Summary: Mock object library for ruby
Name: rubygem-%{gem_name}
Version: 3.0.1
Release: 1%{?dist}
Release: 2%{?dist}
License: MIT
URL: https://github.com/doudou/flexmock
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
Source1: %{gem_name}-%{version}-test-missing-files.tar.gz
# Source1 is created fron Source2
Source2: flexmock-create-missing-test-files.sh
# make testsuite compatible for ruby34 formatting change
Patch0: flexmock-3.0.1-testsuite-ruby34-formatting.patch
Requires: ruby(release)
BuildRequires: ruby(release)
@ -35,6 +37,11 @@ This package contains documentation for %{name}.
%setup -q -n %{gem_name}-%{version} -a 1
mv ../%{gem_name}-%{version}.gemspec .
(
cd flexmock/test
%patch -P0 -p2
)
find . -name \*.rb | xargs sed -i -e '\@/usr/bin/env@d'
find . -name \*.gem -or -name \*.rb -or -name \*.rdoc | xargs chmod 0644
@ -92,6 +99,9 @@ popd
%{gem_docdir}/
%changelog
* Mon Nov 18 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.1-2
- Make testsuite compatible with ruby34 formatting change
* Wed Sep 11 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.1-1
- 3.0.1