-
Notifications
You must be signed in to change notification settings - Fork 242
Using Capybara Webkit
Teaspoon allows using Capybara Webkit when running specs from the rake task or command line interface. This allows for a quick alternative to phantomjs if you can't get it working reliably.
This page is dedicated to how to get setup and running.
You'll need to include the capybara-webkit
gem in your Gemfile.
gem "capybara-webkit"
Configure Teaspoon to use the capybara_webkit driver.
spec/javascripts/teaspoon_env.rb
Teaspoon.configure do |config|
config.driver = :capybara_webkit
end
Now when you run rake teaspoon
it should be using Capybara Webkit to run your specs. You can also override the driver using rake teaspoon DRIVER=capybara_webkit
or bundle exec teaspoon --driver=capybara_webkit
.
To get this running on Travis CI, you'll need to modify your .travis.yml
file. See the Travis docs.
Put xvfb-run
before the teaspoon command.
script: xvfb-run teaspoon
.travis.yml
before_script:
- 'sh -e /etc/init.d/xvfb start'
env:
- DISPLAY=":99.0"