【发布时间】:2010-03-31 21:32:35
【问题描述】:
我正在使用 rSpec 来测试我的应用程序。在我的应用程序控制器中,我有一个这样的方法:
def set_current_account
@current_account ||= Account.find_by_subdomain(request.subdomains.first)
end
是否可以在我的规范中设置 request.subdomain ?也许在前块?我是 rSpec 的新手,所以任何关于这方面的建议都会非常感谢。
伊夫
【问题讨论】:
标签: ruby-on-rails rspec subdomain specifications