Permalink
Browse files

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.
  • Loading branch information...
1 parent 8598633 commit 621b5b7f0e608bc916a66a6e046f11485317949c @hsbt hsbt committed with sikachu Dec 29, 2012
Showing with 10 additions and 2 deletions.
  1. +10 −2 activesupport/lib/active_support/testing/isolation.rb
@@ -12,8 +12,8 @@ def initialize(exception)
end
class ProxyTestResult
- def initialize
- @calls = []
+ def initialize(calls = [])
+ @calls = calls
end
def add_error(e)
@@ -27,6 +27,14 @@ def __replay__(result)
end
end
+ def marshal_dump
+ @calls
+ end
+
+ def marshal_load(calls)
+ initialize(calls)
+ end
+
def method_missing(name, *args)
@calls << [name, args]
end

0 comments on commit 621b5b7

Please sign in to comment.