在Rails上的ruby中运行测试时具有默认端口 [英] Having a default port when running tests in ruby on rails

查看:58
本文介绍了在Rails上的ruby中运行测试时具有默认端口的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用
rake spec
Im运行我的测试,我使用带有硒作为webdriver的rspec,capybara。问题是我什么时候尝试运行规格,每次都会在不同的端口启动测试环境。我不希望发生这种情况,因为这会弄乱我的Facebook登录名。
如何使环境每次都在同一端口启动。
请帮助!

Im trying to run my tests with rake spec Im using rspec,capybara with selenium as webdriver. The problem is when ever I try to run the specs It starts up the testing environment in a different port every time. I don't want this to happen as it messes up my Facebook login. How would I make the environment start in the same port every time. pls help!

推荐答案

查看config / initializers / webservice.rb并尝试将config.port值设置为某事...我不完全确定这确实可以做您想要的,但是值得研究。

Look in config/initializers/webservice.rb and try setting the config.port value to something...I'm not entirely sure this will actually do what you want but it's worth looking into.

这篇关于在Rails上的ruby中运行测试时具有默认端口的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆