aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/testing
diff options
context:
space:
mode:
authoryuuji.yaginuma <yuuji.yaginuma@gmail.com>2018-01-02 18:15:11 +0900
committeryuuji.yaginuma <yuuji.yaginuma@gmail.com>2018-01-03 17:37:09 +0900
commit3a077f369199651fa62a3e9b8ab2d8f8ee70a0e9 (patch)
treedb15edf4e7e479f046213b3f560d0c4ac2bbc59f /activesupport/lib/active_support/testing
parenta0fc2bee473fe3d6deec2105bb721192cf9e5a97 (diff)
downloadrails-3a077f369199651fa62a3e9b8ab2d8f8ee70a0e9.tar.gz
rails-3a077f369199651fa62a3e9b8ab2d8f8ee70a0e9.tar.bz2
rails-3a077f369199651fa62a3e9b8ab2d8f8ee70a0e9.zip
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.
Diffstat (limited to 'activesupport/lib/active_support/testing')
-rw-r--r--activesupport/lib/active_support/testing/isolation.rb6
1 files changed, 4 insertions, 2 deletions
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