diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-01-02 18:15:11 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2018-01-03 17:37:09 +0900 |
commit | 3a077f369199651fa62a3e9b8ab2d8f8ee70a0e9 (patch) | |
tree | db15edf4e7e479f046213b3f560d0c4ac2bbc59f /activesupport | |
parent | a0fc2bee473fe3d6deec2105bb721192cf9e5a97 (diff) | |
download | rails-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')
-rw-r--r-- | activesupport/lib/active_support/testing/isolation.rb | 6 |
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 |