I noticed that my tests are run in the www.example.com domain. I'm
using rspec and capybara, so `visit sports_url` tries to visit
www.example.com/sports. This works fine with the default test driver,
but I have some javascript that I need to test. These tests fail
because the browser tries to access www.example.com/sports (which
obviously doesn't exist). The browser is used by the selenium driver
of capybara to test javascript. If I use `visit sports_path` the
local web server is access with both the standard and selenium
drivers.

Should I be configuring the test environment somehow to NOT be running
as www.example.com? Or am I testing in the wrong way?

Thanks

--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.

Search Discussions

Related Discussions

Discussion Navigation
viewthread | post
posts ‹ prev | 1 of 1 | next ›
Discussion Overview
grouprubyonrails-talk @
categoriesrubyonrails
postedMar 14, '12 at 10:00p
activeMar 14, '12 at 10:00p
posts1
users1
websiterubyonrails.org
irc#RubyOnRails

1 user in discussion

Tyler DeWitt: 1 post

People

Translate

site design / logo © 2021 Grokbase