From 3a077f369199651fa62a3e9b8ab2d8f8ee70a0e9 Mon Sep 17 00:00:00 2001 From: "yuuji.yaginuma" Date: Tue, 2 Jan 2018 18:15:11 +0900 Subject: 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(-) (limited to 'activesupport') diff --git a/activesupport/lib/active_support/testing/isolation.rb b/activesupport/lib/active_support/testing/isolation.rb index fa9bebb181..562f985f1b 100644 --- a/activesupport/lib/active_support/testing/isolation.rb +++ b/activesupport/lib/active_support/testing/isolation.rb @@ -45,7 +45,8 @@ module ActiveSupport 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 @@ module ActiveSupport 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 -- cgit v1.2.3