diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2018-01-10 15:46:29 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-01-10 15:46:29 -0800 |
commit | 013a8abd48a020954ff60524943fec82064147dc (patch) | |
tree | 773afb061e61abf38a14e744ca57e70c532518c5 /activesupport/lib/active_support/testing | |
parent | ae48c65e411e01c1045056562319666384bb1b63 (diff) | |
parent | 76b75ac09406304e4d03f2d643b2ebd7bdaa6224 (diff) | |
download | rails-013a8abd48a020954ff60524943fec82064147dc.tar.gz rails-013a8abd48a020954ff60524943fec82064147dc.tar.bz2 rails-013a8abd48a020954ff60524943fec82064147dc.zip |
Merge pull request #31624 from y-yagi/fix_minitest_511
Add support for Minitest 5.11
Diffstat (limited to 'activesupport/lib/active_support/testing')
-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 |