diff options
author | Carl Lerche <carllerche@mac.com> | 2009-09-29 16:07:29 -0700 |
---|---|---|
committer | Carl Lerche <carllerche@mac.com> | 2009-09-29 16:07:29 -0700 |
commit | 6b086449bebc4ecbd11887c74f0c16c0c38089dc (patch) | |
tree | a586d299fc4f08ba301da36622272b8a6f13633a /activesupport/lib/active_support | |
parent | 6f6a589d4b564f5db78735ad0c7225c22ced57ac (diff) | |
download | rails-6b086449bebc4ecbd11887c74f0c16c0c38089dc.tar.gz rails-6b086449bebc4ecbd11887c74f0c16c0c38089dc.tar.bz2 rails-6b086449bebc4ecbd11887c74f0c16c0c38089dc.zip |
Fix the broken railties isolation tests
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/testing/isolation.rb | 13 |
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 |