Thursday, December 23, 2010

Capybara and Selenium in Rails 3 tests fail and browser doesn't start

I had an issue with Firefox not starting to run Selenium in Rails 3.
Instead, my tests failed, giving me all red (even for steps that were previously passing without JS). Turns out this is caused by a dependency issue.
Someone thankfully posted a question on StackOverflow that helped me get through this.
To fix it, simply run add this to your Gemfile
gem 'database_cleaner'
view raw gistfile1.rb hosted with ❤ by GitHub

Then run
bundle install
view raw gistfile1.rb hosted with ❤ by GitHub

This should fix it for you.

You can also track this issue at Github, where I posted this very solution.

No comments:

Post a Comment