Compare commits
No commits in common. "rawhide" and "f35" have entirely different histories.
9 changed files with 102 additions and 123 deletions
37
.gitignore
vendored
37
.gitignore
vendored
|
|
@ -1,2 +1,35 @@
|
||||||
/flexmock-*.gem
|
flexmock-0.8.7.gem
|
||||||
/flexmock-*-test-missing-files.tar.gz
|
/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
|
||||||
|
|
|
||||||
|
|
@ -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
|
git clone https://github.com/doudou/flexmock.git
|
||||||
|
|
||||||
cd flexmock
|
cd flexmock
|
||||||
git reset --hard v$VERSION
|
git reset --hard $VERSION
|
||||||
cd ..
|
cd ..
|
||||||
|
|
||||||
tar czf $CURDIR/flexmock-${VERSION}-test-missing-files.tar.gz flexmock/test/
|
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
|
Summary: Mock object library for ruby
|
||||||
Name: rubygem-%{gem_name}
|
Name: rubygem-%{gem_name}
|
||||||
Version: 3.0.2
|
Version: 2.3.6
|
||||||
Release: 1%{?dist}
|
Release: 10%{?dist}
|
||||||
License: MIT
|
License: MIT
|
||||||
URL: https://github.com/doudou/flexmock
|
URL: https://github.com/doudou/flexmock
|
||||||
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
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
|
# Source1 is created fron Source2
|
||||||
Source2: flexmock-create-missing-test-files.sh
|
Source2: flexmock-create-missing-test-files.sh
|
||||||
# make testsuite compatible for ruby34 formatting change
|
# https://bugs.ruby-lang.org/issues/14230
|
||||||
Patch0: flexmock-3.0.2-testsuite-ruby34-formatting.patch
|
# e.g. https://github.com/deivid-rodriguez/pry-byebug/pull/246
|
||||||
# Remove warnings for string literal being frozen in the future
|
# Use binding.source_location
|
||||||
Patch1: flexmock-3.0.2-ruby34-string-literal-frozen.patch
|
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)
|
Requires: ruby(release)
|
||||||
BuildRequires: ruby(release)
|
BuildRequires: ruby(release)
|
||||||
|
|
@ -36,19 +40,23 @@ Requires: %{name} = %{version}-%{release}
|
||||||
This package contains documentation for %{name}.
|
This package contains documentation for %{name}.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q -n %{gem_name}-%{version} -a 1
|
gem unpack %{SOURCE0}
|
||||||
mv ../%{gem_name}-%{version}.gemspec .
|
%setup -q -D -T -n %{gem_name}-%{version} -a 1
|
||||||
|
|
||||||
mv flexmock/test .
|
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
||||||
|
|
||||||
%patch -P0 -p1
|
(
|
||||||
%patch -P1 -p1
|
cd flexmock
|
||||||
|
%patch1 -p1
|
||||||
|
%patch3 -p1
|
||||||
|
)
|
||||||
|
%patch2 -p1
|
||||||
|
|
||||||
find . -name \*.rb | xargs sed -i -e '\@/usr/bin/env@d'
|
find . -name \*.rb | xargs sed -i -e '\@/usr/bin/env@d'
|
||||||
find . -name \*.gem -or -name \*.rb -or -name \*.rdoc | xargs chmod 0644
|
find . -name \*.gem -or -name \*.rb -or -name \*.rdoc | xargs chmod 0644
|
||||||
|
|
||||||
%build
|
%build
|
||||||
gem build %{gem_name}-%{version}.gemspec
|
gem build %{gem_name}.gemspec
|
||||||
%gem_install
|
%gem_install
|
||||||
|
|
||||||
%install
|
%install
|
||||||
|
|
@ -58,41 +66,32 @@ cp -a .%{gem_dir}/* %{buildroot}%{gem_dir}/
|
||||||
pushd %{buildroot}%{gem_instdir}
|
pushd %{buildroot}%{gem_instdir}
|
||||||
rm -rf \
|
rm -rf \
|
||||||
.autotest .gitignore .togglerc .travis.yml .yardopts \
|
.autotest .gitignore .togglerc .travis.yml .yardopts \
|
||||||
.github \
|
|
||||||
Gemfile \
|
Gemfile \
|
||||||
Rakefile \
|
Rakefile \
|
||||||
flexmock.blurb \
|
flexmock.blurb \
|
||||||
flexmock.gemspec \
|
flexmock.gemspec \
|
||||||
install.rb \
|
install.rb
|
||||||
test/ \
|
|
||||||
%{nil}
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
rm -f %{buildroot}%{gem_cache}
|
|
||||||
|
|
||||||
%check
|
%check
|
||||||
cp -a test .%{gem_instdir}
|
cp -a flexmock/test .%{gem_instdir}
|
||||||
pushd .%{gem_instdir}
|
pushd .%{gem_instdir}
|
||||||
|
|
||||||
export RUBYOPT=-W:deprecated
|
export RUBYOPT=-W:deprecated
|
||||||
export RUBYLIB=$(pwd)/lib:$(pwd):$(pwd)/test
|
export RUBYLIB=$(pwd)/lib:$(pwd):$(pwd)/test
|
||||||
ruby \
|
ruby \
|
||||||
-e 'Dir.glob("test/*_test.rb").each {|f| require f}'
|
-e 'Dir.glob("test/*_test.rb").each {|f| require f}'
|
||||||
|
rspec test/rspec_integration/
|
||||||
# Note: exclude failing tests for now
|
|
||||||
rspec test/rspec_integration/ \
|
|
||||||
--exclude-pattern 'test/rspec_integration/spy_example_spec.rb' \
|
|
||||||
%{nil}
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
||||||
%files
|
%files
|
||||||
%dir %{gem_instdir}
|
%dir %{gem_instdir}
|
||||||
%license %{gem_instdir}/LICENSE.txt
|
%doc %{gem_instdir}/[A-Z]*
|
||||||
%doc %{gem_instdir}/[A-CR-Z]*
|
|
||||||
|
|
||||||
%{gem_libdir}
|
%{gem_libdir}
|
||||||
%{gem_instdir}/rakelib/
|
%{gem_instdir}/rakelib/
|
||||||
|
%exclude %{gem_cache}
|
||||||
%{gem_spec}
|
%{gem_spec}
|
||||||
|
|
||||||
%files doc
|
%files doc
|
||||||
|
|
@ -101,52 +100,6 @@ popd
|
||||||
%{gem_docdir}/
|
%{gem_docdir}/
|
||||||
|
|
||||||
%changelog
|
%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
|
|
||||||
|
|
||||||
* Mon Jan 22 2024 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.8-2
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
|
|
||||||
|
|
||||||
* Mon Aug 14 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.3.8-1
|
|
||||||
- 2.3.8
|
|
||||||
|
|
||||||
* Tue Aug 08 2023 Mamoru TASAKA <mtasaka@fedoraproject.org> - 2.3.6-15
|
|
||||||
- Handle MiniTest 5.19+
|
|
||||||
|
|
||||||
* Fri Jul 21 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.6-14
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jan 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.6-13
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
|
|
||||||
|
|
||||||
* Sat Jul 23 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.6-12
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jan 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.6-11
|
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
|
|
||||||
|
|
||||||
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.6-10
|
* Fri Jul 23 2021 Fedora Release Engineering <releng@fedoraproject.org> - 2.3.6-10
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
|
||||||
|
|
||||||
|
|
|
||||||
4
sources
4
sources
|
|
@ -1,2 +1,2 @@
|
||||||
SHA512 (flexmock-3.0.2.gem) = 07902e5641e2d014e626c1b64f65aeae493fff88ea4f7be42816e63f7609db92ff5fa3b1ad3010e6c352c88f81480667326d83257f55de17b388f3ab68ece827
|
SHA512 (flexmock-2.3.6.gem) = 9db8c95d8784e66743f089e7f1660a8205f6fbd63c820126ce551c581fe242b601cdcf34dfa2b93576ef83aaded29bedd6c0506d358d12fad9e423982b35f848
|
||||||
SHA512 (flexmock-3.0.2-test-missing-files.tar.gz) = 3660f0f4cdeab1f92d5b89a57217effdacfdf91fa80eea22fb0baa4bba99bed99b5a8f6c918fd6e008bd2c5d3005ec5a9bd18feb11d9c56c03b292a3a9cc3abd
|
SHA512 (flexmock-v2.3.6-test-missing-files.tar.gz) = d6265af9d3aa1d546046f985afd45da4de17342ba5897690708d420d7b695e75ed2f9c81fe17a2036cabbdcb0e81a1a233f4494ddc98f6625b88ceea3c959a93
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue