I wanted to do some javascript integration tests for my app (I use Chrome as a browser) but Capybara is not detecting the Selenium driver.
Here is my test suite: Linux (Ubuntu 12.10) RoR 3.1 Rspec Capybara
I also installed database_cleaner and followed the instructions on how to update my spec_helper and environment:
spec_helper
#Database_cleaner
config.use_transactional_fixtures = false
config.before(:each) { DatabaseCleaner.start }
config.after(:each) { DatabaseCleaner.clean }
Capybara.register_driver :selenium do |app|
Capybara::Selenium::Driver.new(app, :browser => :chrome)
end
I also downloaded the chromedriver, moved it to my user/bin folder and ran the following command to render it executable:
sudo chmod +x /usr/bin/chromedriver
The message I get from my autotest is the following:
Failure/Error: visit root_path
LoadError:
Capybara's selenium driver is unable to load `selenium-webdriver`, please install the gem and add `gem 'selenium-webdriver'` to your Gemfile if you are using bundler.
Any help would be appreciated.