I try to stub my request.env
require 'spec_helper'
describe AuthenticationController do
render_views
include Devise::TestHelpers
describe "GET 'create'" do
@request.env["HTTP_REFERER"] = '/'
results in
`method_missing': undefined method `env' for nil:NilClass (NoMethodError)
How can I put开发者_JS百科 data into my request.env object before calling the method? Also using request.env = does not work.
精彩评论