From 621b5b7f0e608bc916a66a6e046f11485317949c Mon Sep 17 00:00:00 2001 From: SHIBATA Hiroshi Date: Sat, 29 Dec 2012 14:07:09 +0900 Subject: added marshal_load and marshal_dump for ProxyTestResult. Behavior of method_missing with Marshal.dump and Marshal.load is changing in ruby 2.0.0 later. --- activesupport/lib/active_support/testing/isolation.rb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'activesupport/lib/active_support') diff --git a/activesupport/lib/active_support/testing/isolation.rb b/activesupport/lib/active_support/testing/isolation.rb index 6b29ba4c10..77c04758ba 100644 --- a/activesupport/lib/active_support/testing/isolation.rb +++ b/activesupport/lib/active_support/testing/isolation.rb @@ -12,8 +12,8 @@ module ActiveSupport end class ProxyTestResult - def initialize - @calls = [] + def initialize(calls = []) + @calls = calls end def add_error(e) @@ -27,6 +27,14 @@ module ActiveSupport end end + def marshal_dump + @calls + end + + def marshal_load(calls) + initialize(calls) + end + def method_missing(name, *args) @calls << [name, args] end -- cgit v1.2.3