initialize ivars, refactor recycle! to call initialize
This commit is contained in:
parent
82667c84e1
commit
76d75f4240
@ -220,15 +220,7 @@ def default_env
|
||||
|
||||
class TestResponse < ActionDispatch::TestResponse
|
||||
def recycle!
|
||||
@status = 200
|
||||
@header = {}
|
||||
@writer = lambda { |x| @body << x }
|
||||
@block = nil
|
||||
@length = 0
|
||||
@body = []
|
||||
@committed = false
|
||||
@charset = @content_type = nil
|
||||
@request = @template = nil
|
||||
initialize
|
||||
end
|
||||
end
|
||||
|
||||
|
@ -74,6 +74,8 @@ def initialize(status = 200, header = {}, body = [])
|
||||
@blank = false
|
||||
@cv = new_cond
|
||||
@committed = false
|
||||
@content_type = nil
|
||||
@charset = nil
|
||||
|
||||
if content_type = self[CONTENT_TYPE]
|
||||
type, charset = content_type.split(/;\s*charset=/)
|
||||
|
Loading…
Reference in New Issue
Block a user