I'm starting with integration tests and I'm using Docker on my dev env.
I have selenium-webdriver
gem installed and this config file:
docker_ip = %x(/sbin/ip route|awk '/default/ { print $3 }').strip
Capybara.register_driver :selenium do |app|
Capybara::Selenium::Driver.new(app,
:browser => :remote,
:url => "http://#{docker_ip}:4444/wd/hub")
end
Capybara.app_host = "http://#{docker_ip}:3010"
Capybara.server_host = '0.0.0.0'
Capybara.server_port = '3011'
and when I run my integration test, it fails because I created a record with FactoryGirl (which creates on test DB) and my app (on port 3010) is running in dev env. Capybara should starts by itself my app in test env? What am I doing wrong?
PS: My app starts on dev end when I run docker-compose up