相关疑难解决方法(0)

Rails rspec设置子域

我正在使用rSpec来测试我的应用程序.在我的应用程序控制器中,我有一个这样的方法:

def set_current_account
  @current_account ||= Account.find_by_subdomain(request.subdomains.first)
end
Run Code Online (Sandbox Code Playgroud)

是否可以在我的规范中设置request.subdomain?也许在之前的街区?我是rSpec的新手所以对此有任何建议都非常感谢.

EEF

subdomain specifications rspec ruby-on-rails

57
推荐指数
3
解决办法
2万
查看次数

标签 统计

rspec ×1

ruby-on-rails ×1

specifications ×1

subdomain ×1