I have the following code
require 'test_helper'
class ApplicationControllerTest < ActionController::TestCase
test "should display the page in german" do
get :index
assert_response :success
# ...
request.env["HTTP_REFERER"] = :index
# ...
end
end
If I run this rails functional test with
$ rake test:functionals
I get this error:
test_should_display_the_page_in_german(ApplicationControllerTest):
NameError: undefined local variable or method `request' for #<ApplicationControllerTest:0x1044c6d00>
How can i Access the "request" variable?