使用 nginx 运行水豚
是否可以使用 nginx 和乘客来运行水豚?而是 webrick? Capybara 与 Cucumber 一起安装在 Rails 应用程序中。
Is is possible to run capybara with nginx and passenger? instead or webrick? Capybara is installed with cucumber in a rails app.
是否可以使用 nginx 和乘客来运行水豚?而是 webrick? Capybara 与 Cucumber 一起安装在 Rails 应用程序中。
Is is possible to run capybara with nginx and passenger? instead or webrick? Capybara is installed with cucumber in a rails app.
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
这很简单 - 你唯一要做的就是改变你的想法 - 水豚和黄瓜都不受本地环境的束缚,你可以测试位于互联网上的应用程序,它不会关心它 - 你甚至可以测试谷歌。如果你愿意的话。
对于您的特定问题,您必须设置
您可以使用黄瓜钩子轻松控制应用程序的重新启动,您可以将其配置为在每次测试之前或测试套件之前重新启动。 (请参阅 cucumber wiki)在钩子中,您必须发出
FileUtils.touch tmp/restart.txt
命令。与数据库相同 - 您可以手动设置挂钩以在需要时截断它(请参阅 database_cleaner gem)It is easy - the only thing you have to do is to switch your mind - neither capybara nor cucumber are not tied to local environment you can test application that is located in internet and it will not care about it - you can even test google.com if you want.
For your particular problem you'll have to set
You can easily control restarting of your application using cucumber hooks, you can configure it to restart before each test or before test suite. (See cucumber wiki) Within hook you'll have to issue
FileUtils.touch tmp/restart.txt
command. The same with database - you can manually setup hook to truncate it whenever it is needed (See database_cleaner gem)