From 6b086449bebc4ecbd11887c74f0c16c0c38089dc Mon Sep 17 00:00:00 2001 From: Carl Lerche Date: Tue, 29 Sep 2009 16:07:29 -0700 Subject: Fix the broken railties isolation tests --- activesupport/lib/active_support/testing/isolation.rb | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) (limited to 'activesupport') 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 -- cgit v1.2.3