I have a rails app with a feature spec that verify page url after user login expect(page.current_url).to eq(posts_url)
.
I configure Capybara host in spec/spec_helper.rb
like this
config.before(:each) do
Capybara.app_host = "http://mydomain.dev"
end
Test fail with note:
expected: "http://ift.tt/UqzmSA"
got: "http://ift.tt/1F9dDPH"
I configure rails hosts with Rails.application.routes.default_url_options[:host] = 'mydomain.dev'
but is seems it doesn't work properly (my tests still fails)
Aucun commentaire:
Enregistrer un commentaire