Having a default port when running tests in ruby o

2019-05-07 03:08发布

问题:

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!

回答1:

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.