aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport/lib/active_support/testing/isolation.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activesupport/lib/active_support/testing/isolation.rb')
-rw-r--r--activesupport/lib/active_support/testing/isolation.rb13
1 files changed, 9 insertions, 4 deletions
diff --git a/activesupport/lib/active_support/testing/isolation.rb b/activesupport/lib/active_support/testing/isolation.rb
index 30e194536b..cdd6d5f49b 100644
--- a/activesupport/lib/active_support/testing/isolation.rb
+++ b/activesupport/lib/active_support/testing/isolation.rb
@@ -31,10 +31,15 @@ module ActiveSupport
@_result = result
- proxy = run_in_isolation do |proxy|
- super(proxy) { }
+ serialized = run_in_isolation do |proxy|
+ begin
+ super(proxy) { }
+ rescue Exception => e
+ proxy.add_error(Test::Unit::Error.new(name, e))
+ end
end
+ proxy = Marshal.load(serialized)
proxy.__replay__(@_result)
yield(Test::Unit::TestCase::FINISHED, name)
@@ -55,7 +60,7 @@ module ActiveSupport
write.close
result = read.read
Process.wait2(pid)
- Marshal.load(result.unpack("m")[0])
+ return result.unpack("m")[0]
end
end
@@ -83,7 +88,7 @@ module ActiveSupport
ENV.delete("ISOLATION_TEST")
ENV.delete("ISOLATION_OUTPUT")
- return Marshal.load(tmpfile.read.unpack("m")[0])
+ return tmpfile.read.unpack("m")[0]
end
end
end