Compare commits
No commits in common. "rawhide" and "f40" have entirely different histories.
9 changed files with 99 additions and 95 deletions
39
.gitignore
vendored
39
.gitignore
vendored
|
|
@ -1,2 +1,37 @@
|
|||
/flexmock-*.gem
|
||||
/flexmock-*-test-missing-files.tar.gz
|
||||
flexmock-0.8.7.gem
|
||||
/flexmock-0.8.11.gem
|
||||
/flexmock-0.9.0.gem
|
||||
/flexmock-1.0.2.gem
|
||||
/flexmock-1.0.3.gem
|
||||
/flexmock-1.1.0.gem
|
||||
/flexmock-1.2.0.gem
|
||||
/flexmock-1.3.0.gem
|
||||
/flexmock-1.3.1.gem
|
||||
/flexmock-1.3.2.gem
|
||||
/flexmock-1.3.3.gem
|
||||
/flexmock-2.0.0.gem
|
||||
/flexmock-v2.0.0-test-missing-files.tar.gz
|
||||
/flexmock-2.0.1.gem
|
||||
/flexmock-v2.0.1-test-missing-files.tar.gz
|
||||
/flexmock-2.0.2.gem
|
||||
/flexmock-v2.0.2-test-missing-files.tar.gz
|
||||
/flexmock-2.0.3.gem
|
||||
/flexmock-v2.0.3-test-missing-files.tar.gz
|
||||
/flexmock-2.0.4.gem
|
||||
/flexmock-v2.0.4-test-missing-files.tar.gz
|
||||
/flexmock-2.0.5.gem
|
||||
/flexmock-v2.0.5-test-missing-files.tar.gz
|
||||
/flexmock-2.1.0.gem
|
||||
/flexmock-v2.1.0-test-missing-files.tar.gz
|
||||
/flexmock-2.2.1.gem
|
||||
/flexmock-v2.2.1-test-missing-files.tar.gz
|
||||
/flexmock-2.3.0.gem
|
||||
/flexmock-v2.3.0-test-missing-files.tar.gz
|
||||
/flexmock-2.3.4.gem
|
||||
/flexmock-v2.3.4-test-missing-files.tar.gz
|
||||
/flexmock-2.3.5.gem
|
||||
/flexmock-v2.3.5-test-missing-files.tar.gz
|
||||
/flexmock-2.3.6.gem
|
||||
/flexmock-v2.3.6-test-missing-files.tar.gz
|
||||
/flexmock-2.3.8.gem
|
||||
/flexmock-v2.3.8-test-missing-files.tar.gz
|
||||
|
|
|
|||
|
|
@ -1,33 +0,0 @@
|
|||
diff -urp '--exclude=*~' flexmock-3.0.2.orig/lib/flexmock/spy_describers.rb flexmock-3.0.2/lib/flexmock/spy_describers.rb
|
||||
--- flexmock-3.0.2.orig/lib/flexmock/spy_describers.rb 2025-08-13 16:49:42.102930421 +0900
|
||||
+++ flexmock-3.0.2/lib/flexmock/spy_describers.rb 2025-08-13 16:56:27.493387656 +0900
|
||||
@@ -18,7 +18,7 @@ class FlexMock
|
||||
end
|
||||
|
||||
def describe_spy(spy, sym, args, kw, options, not_clause="")
|
||||
- result = "expected "
|
||||
+ result = "expected ".dup
|
||||
result << FlexMock.format_call(sym, args, kw)
|
||||
result << " to#{not_clause} be received by " << spy.inspect
|
||||
result << times_description(options[:times])
|
||||
@@ -29,7 +29,7 @@ class FlexMock
|
||||
end
|
||||
|
||||
def describe_calls(spy)
|
||||
- result = ''
|
||||
+ result = ''.dup
|
||||
if spy.flexmock_calls.empty?
|
||||
result << "No messages have been received\n"
|
||||
else
|
||||
diff -urp '--exclude=*~' flexmock-3.0.2.orig/test/container_methods_test.rb flexmock-3.0.2/test/container_methods_test.rb
|
||||
--- flexmock-3.0.2.orig/test/container_methods_test.rb 2025-08-13 16:49:41.505249913 +0900
|
||||
+++ flexmock-3.0.2/test/container_methods_test.rb 2025-08-13 18:12:33.787388043 +0900
|
||||
@@ -112,7 +112,7 @@ class TestFlexmockContainerMethods < Min
|
||||
end
|
||||
|
||||
def test_stubbing_a_string
|
||||
- s = "hello"
|
||||
+ s = "hello".dup
|
||||
flexmock(:base, s, :length => 2)
|
||||
assert_equal 2, s.length
|
||||
end
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
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
|
||||
|
|
@ -22,7 +22,7 @@ pushd $TMPDIR
|
|||
git clone https://github.com/doudou/flexmock.git
|
||||
|
||||
cd flexmock
|
||||
git reset --hard v$VERSION
|
||||
git reset --hard $VERSION
|
||||
cd ..
|
||||
|
||||
tar czf $CURDIR/flexmock-${VERSION}-test-missing-files.tar.gz flexmock/test/
|
||||
|
|
|
|||
15
rubygem-flexmock-2.3.6-accept-keywords.patch
Normal file
15
rubygem-flexmock-2.3.6-accept-keywords.patch
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
diff -urp '--exclude=*~' flexmock-2.3.6/lib.orig/flexmock/composite_expectation.rb flexmock-2.3.6/lib/flexmock/composite_expectation.rb
|
||||
--- flexmock-2.3.6/lib.orig/flexmock/composite_expectation.rb 2021-01-24 01:35:33.614853539 +0900
|
||||
+++ flexmock-2.3.6/lib/flexmock/composite_expectation.rb 2021-01-24 02:27:58.007313654 +0900
|
||||
@@ -16,9 +16,9 @@ class FlexMock
|
||||
end
|
||||
|
||||
# Apply the constraint method to all expectations in the composite.
|
||||
- def method_missing(sym, *args, &block)
|
||||
+ def method_missing(sym, *args, **keywords, &block)
|
||||
@expectations.each do |expectation|
|
||||
- expectation.send(sym, *args, &block)
|
||||
+ expectation.send(sym, *args, **keywords, &block)
|
||||
end
|
||||
self
|
||||
end
|
||||
11
rubygem-flexmock-2.3.6-testsuite-binding-source.patch
Normal file
11
rubygem-flexmock-2.3.6-testsuite-binding-source.patch
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
--- flexmock-2.3.6/test/test_helper.rb.ruby3 2021-01-24 00:41:42.121385766 +0900
|
||||
+++ flexmock-2.3.6/test/test_helper.rb 2021-01-24 00:44:25.866236105 +0900
|
||||
@@ -50,7 +50,7 @@
|
||||
# added.
|
||||
def assert_mock_failure(klass, options={}, &block)
|
||||
ex = assert_failure(klass, options, &block)
|
||||
- file = eval("__FILE__", block.binding)
|
||||
+ file = block.binding.source_location.first
|
||||
assert_matching_line(ex, file, options)
|
||||
end
|
||||
|
||||
12
rubygem-flexmock-2.3.6-workaround-relax-error-message.patch
Normal file
12
rubygem-flexmock-2.3.6-workaround-relax-error-message.patch
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
--- 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
|
||||
|
|
@ -2,18 +2,22 @@
|
|||
|
||||
Summary: Mock object library for ruby
|
||||
Name: rubygem-%{gem_name}
|
||||
Version: 3.0.2
|
||||
Release: 1%{?dist}
|
||||
Version: 2.3.8
|
||||
Release: 3%{?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: %{gem_name}-v%{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.2-testsuite-ruby34-formatting.patch
|
||||
# Remove warnings for string literal being frozen in the future
|
||||
Patch1: flexmock-3.0.2-ruby34-string-literal-frozen.patch
|
||||
# https://bugs.ruby-lang.org/issues/14230
|
||||
# e.g. https://github.com/deivid-rodriguez/pry-byebug/pull/246
|
||||
# Use binding.source_location
|
||||
Patch1: rubygem-flexmock-2.3.6-testsuite-binding-source.patch
|
||||
# ruby 3.0 splits argument / keywords
|
||||
Patch2: rubygem-flexmock-2.3.6-accept-keywords.patch
|
||||
# relax error messages on test suite on ruby 3.0
|
||||
Patch3: rubygem-flexmock-2.3.6-workaround-relax-error-message.patch
|
||||
|
||||
Requires: ruby(release)
|
||||
BuildRequires: ruby(release)
|
||||
|
|
@ -39,10 +43,12 @@ This package contains documentation for %{name}.
|
|||
%setup -q -n %{gem_name}-%{version} -a 1
|
||||
mv ../%{gem_name}-%{version}.gemspec .
|
||||
|
||||
mv flexmock/test .
|
||||
|
||||
%patch -P0 -p1
|
||||
(
|
||||
cd flexmock
|
||||
%patch -P1 -p1
|
||||
%patch -P3 -p1
|
||||
)
|
||||
%patch -P2 -p1
|
||||
|
||||
find . -name \*.rb | xargs sed -i -e '\@/usr/bin/env@d'
|
||||
find . -name \*.gem -or -name \*.rb -or -name \*.rdoc | xargs chmod 0644
|
||||
|
|
@ -63,36 +69,28 @@ rm -rf \
|
|||
Rakefile \
|
||||
flexmock.blurb \
|
||||
flexmock.gemspec \
|
||||
install.rb \
|
||||
test/ \
|
||||
%{nil}
|
||||
install.rb
|
||||
popd
|
||||
|
||||
rm -f %{buildroot}%{gem_cache}
|
||||
|
||||
%check
|
||||
cp -a test .%{gem_instdir}
|
||||
cp -a flexmock/test .%{gem_instdir}
|
||||
pushd .%{gem_instdir}
|
||||
|
||||
export RUBYOPT=-W:deprecated
|
||||
export RUBYLIB=$(pwd)/lib:$(pwd):$(pwd)/test
|
||||
ruby \
|
||||
-e 'Dir.glob("test/*_test.rb").each {|f| require f}'
|
||||
|
||||
# Note: exclude failing tests for now
|
||||
rspec test/rspec_integration/ \
|
||||
--exclude-pattern 'test/rspec_integration/spy_example_spec.rb' \
|
||||
%{nil}
|
||||
rspec test/rspec_integration/
|
||||
popd
|
||||
|
||||
|
||||
%files
|
||||
%dir %{gem_instdir}
|
||||
%license %{gem_instdir}/LICENSE.txt
|
||||
%doc %{gem_instdir}/[A-CR-Z]*
|
||||
%doc %{gem_instdir}/[A-Z]*
|
||||
|
||||
%{gem_libdir}
|
||||
%{gem_instdir}/rakelib/
|
||||
%exclude %{gem_cache}
|
||||
%{gem_spec}
|
||||
|
||||
%files doc
|
||||
|
|
@ -101,28 +99,6 @@ popd
|
|||
%{gem_docdir}/
|
||||
|
||||
%changelog
|
||||
* Wed Aug 13 2025 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.2-1
|
||||
- 3.0.2
|
||||
- Fix warnigs for string literal being frozen in the future ruby
|
||||
|
||||
* Fri Jul 25 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
|
||||
|
||||
* Sat Jan 18 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.0.1-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
|
||||
|
||||
* 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
|
||||
|
||||
* Tue Sep 03 2024 Mamoru TASAKA <mtasaka@fedoraproject.org> - 3.0.0-1
|
||||
- 3.0.0
|
||||
|
||||
* Fri Jul 19 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.8-4
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
|
||||
|
||||
* Fri Jan 26 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.8-3
|
||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
||||
|
||||
|
|
|
|||
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
|||
SHA512 (flexmock-3.0.2.gem) = 07902e5641e2d014e626c1b64f65aeae493fff88ea4f7be42816e63f7609db92ff5fa3b1ad3010e6c352c88f81480667326d83257f55de17b388f3ab68ece827
|
||||
SHA512 (flexmock-3.0.2-test-missing-files.tar.gz) = 3660f0f4cdeab1f92d5b89a57217effdacfdf91fa80eea22fb0baa4bba99bed99b5a8f6c918fd6e008bd2c5d3005ec5a9bd18feb11d9c56c03b292a3a9cc3abd
|
||||
SHA512 (flexmock-2.3.8.gem) = 9fd9925ceb7e6a8389b88fe788119e0d79199d5d6dc3654d588dc9f108a4fdf6a19cc5cc6528c706124a3e89ad626b4b67afd588ea49ff27ca6bf1245efe4816
|
||||
SHA512 (flexmock-v2.3.8-test-missing-files.tar.gz) = ab05c895bcb01eb2381fb6c4b8f93423342224fc401e6d47e36af950f396f9734462ad8df37cd97ef0461abd591be896f93d33ddcf5e523ac39725498533ac57
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue