aboutsummaryrefslogtreecommitdiffstats
path: root/activesupport
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2013-01-04 16:48:01 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2013-01-04 16:48:01 -0800
commitee1a03ce6e85160239c28a6e0a83368e7cd8da3a (patch)
tree5a260b728968c4d3c3ef43c923d4029a192f9296 /activesupport
parent5458f509d9a3ee4f8b9fb4d1f305ecb86417fc33 (diff)
parentbf620c09aaba53c9c1c8a5848fd6ca2f9b4ba421 (diff)
downloadrails-ee1a03ce6e85160239c28a6e0a83368e7cd8da3a.tar.gz
rails-ee1a03ce6e85160239c28a6e0a83368e7cd8da3a.tar.bz2
rails-ee1a03ce6e85160239c28a6e0a83368e7cd8da3a.zip
Merge pull request #8762 from hsbt/fix-marshal_load
added marshal_load and marshal_dump for ProxyTestResult. Behavior of met...
Diffstat (limited to 'activesupport')
-rw-r--r--activesupport/lib/active_support/testing/isolation.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/testing/isolation.rb b/activesupport/lib/active_support/testing/isolation.rb
index 27d444fd91..aa87598926 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