开发者

Rails3 - RSpec - How to set request.env?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜