Fix MiniTest 5.11 compatibility.
This commit is contained in:
parent
ce860013d4
commit
ce9c9eed97
2 changed files with 46 additions and 1 deletions
|
|
@ -0,0 +1,39 @@
|
|||
From 3a077f369199651fa62a3e9b8ab2d8f8ee70a0e9 Mon Sep 17 00:00:00 2001
|
||||
From: "yuuji.yaginuma" <yuuji.yaginuma@gmail.com>
|
||||
Date: Tue, 2 Jan 2018 18:15:11 +0900
|
||||
Subject: [PATCH] Use `Minitest::Result` for retain test result
|
||||
|
||||
Runnable.marshal_dump/load was removed in
|
||||
https://github.com/seattlerb/minitest/commit/00433fc0a4fdd0e6b302aace633384ba1312237
|
||||
|
||||
Instead, `Minitest::Result` is contained test result and the that can be
|
||||
marshalled.
|
||||
---
|
||||
activesupport/lib/active_support/testing/isolation.rb | 6 ++++--
|
||||
1 file changed, 4 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/activesupport/lib/active_support/testing/isolation.rb b/activesupport/lib/active_support/testing/isolation.rb
|
||||
index fa9bebb181a4..562f985f1ba2 100644
|
||||
--- a/activesupport/lib/active_support/testing/isolation.rb
|
||||
+++ b/activesupport/lib/active_support/testing/isolation.rb
|
||||
@@ -45,7 +45,8 @@ def run_in_isolation(&blk)
|
||||
end
|
||||
}
|
||||
end
|
||||
- result = Marshal.dump(dup)
|
||||
+ test_result = defined?(Minitest::Result) ? Minitest::Result.from(self) : dup
|
||||
+ result = Marshal.dump(test_result)
|
||||
end
|
||||
|
||||
write.puts [result].pack("m")
|
||||
@@ -69,8 +70,9 @@ def run_in_isolation(&blk)
|
||||
|
||||
if ENV["ISOLATION_TEST"]
|
||||
yield
|
||||
+ test_result = defined?(Minitest::Result) ? Minitest::Result.from(self) : dup
|
||||
File.open(ENV["ISOLATION_OUTPUT"], "w") do |file|
|
||||
- file.puts [Marshal.dump(dup)].pack("m")
|
||||
+ file.puts [Marshal.dump(test_result)].pack("m")
|
||||
end
|
||||
exit!
|
||||
else
|
||||
|
|
@ -3,7 +3,7 @@
|
|||
Name: rubygem-%{gem_name}
|
||||
Epoch: 1
|
||||
Version: 5.1.4
|
||||
Release: 1%{?dist}
|
||||
Release: 2%{?dist}
|
||||
Summary: A support libraries and Ruby core extensions extracted from the Rails framework
|
||||
Group: Development/Languages
|
||||
License: MIT
|
||||
|
|
@ -16,6 +16,8 @@ Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
|||
# cd rails/activesupport/
|
||||
# git checkout v5.1.4 && tar czvf activesupport-5.1.4-tests.tgz test/
|
||||
Source1: %{gem_name}-%{version}-tests.tgz
|
||||
# Fix MiniTest 5.11 compatibility.
|
||||
Patch0: rubygem-activesupport-5.1.4-Use-Minitest-Result-for-retain-test-result.patch
|
||||
|
||||
# ruby package has just soft dependency on rubygem({bigdecimal,json}), while
|
||||
# ActiveSupport always requires them.
|
||||
|
|
@ -58,6 +60,7 @@ Documentation for %{name}.
|
|||
%gem_install -n %{SOURCE0}
|
||||
|
||||
pushd .%{gem_instdir}
|
||||
%patch0 -p2
|
||||
popd
|
||||
|
||||
%build
|
||||
|
|
@ -100,6 +103,9 @@ popd
|
|||
%doc %{gem_instdir}/README.rdoc
|
||||
|
||||
%changelog
|
||||
* Fri Jan 19 2018 Vít Ondruch <vondruch@redhat.com> - 1:5.1.4-2
|
||||
- Fix MiniTest 5.11 compatibility.
|
||||
|
||||
* Mon Sep 11 2017 Pavel Valena <pvalena@redhat.com> - 1:5.1.4-1
|
||||
- Update to Active Support 5.1.4.
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue