Permalink
Browse files

Memoizing methods on request means we need to clear them out on recycle!

  • Loading branch information...
1 parent cb1b2a7 commit ff4c218095687ef9925baaca78d644579831d3c1 @wycats wycats committed Jun 4, 2010
Showing with 3 additions and 3 deletions.
  1. +3 −3 actionpack/lib/action_controller/test_case.rb
@@ -155,6 +155,8 @@ def recycle!
@formats = nil
@env.delete_if { |k, v| k =~ /^(action_dispatch|rack)\.request/ }
@env.delete_if { |k, v| k =~ /^action_dispatch\.rescue/ }
+ @method = @request_method = nil
+ @fullpath = @ip = @remote_ip = nil
@env['action_dispatch.request.query_parameters'] = {}
end
end
@@ -167,9 +169,7 @@ def recycle!
@block = nil
@length = 0
@body = []
- @charset = nil
- @content_type = nil
-
+ @charset = @content_type = nil
@request = @template = nil
end
end

0 comments on commit ff4c218

Please sign in to comment.