ActionDispatch::TestResponse.class_eval do
  def json
    JSON.parse(body)
  end
end

module ParseJsonBody
  def json
    JSON.parse(body)
  end
end

ActionDispatch::TestResponse.send(:include, ParseJsonBody)

Convert ParseJsonBody to module prepend
Convert ParseJsonBody to module prepend
