【发布时间】:2013-11-12 04:18:36
【问题描述】:
我正在使用 rspec 在生产环境中测试我的 rails 应用程序。据我所知,rspec 的结构是固定的
spec
|- controllers
|- features
|- production (I need to put is here to run test)
|- mailers
|- models
|- support
|- spec_helper.rb
|- production (I want to put my new folder here)
我想添加新文件夹以包含所有生产测试,这是规范的子文件夹,但如果我这样做,我无法运行测试。 (无方法错误: #) 的未定义方法 `visit'
现在,我将生产文件夹作为功能的子文件夹,以便能够运行测试。
你知道如何解决我的问题吗?
谢谢!
【问题讨论】:
-
什么.... 你不在生产环境中运行测试。您在测试环境中运行测试。
-
@sevenseacat 我想使用 capybara 在生产网站上测试一些流程,以确保部署后功能正常
标签: ruby-on-rails testing rspec-rails production