Skip to content

Instantly share code, notes, and snippets.

@bsa7
Last active August 29, 2015 14:04
Show Gist options
  • Save bsa7/15da2e784b01e6c44d03 to your computer and use it in GitHub Desktop.
Save bsa7/15da2e784b01e6c44d03 to your computer and use it in GitHub Desktop.
xvfb + capybara + webkit

####Install.

sudo apt-get install libqt4-dev
sudo apt-get install xvfb

Gemfile:

gem "capybara-webkit"

in code:

Capybara.javascript_driver = :webkit
Capybara.server_port = '8000'
Capybara.app_host = 'http://localhost:8000'

####Use.

xvfb-run bundle exec rails c

Now, you can test capybara-webkit in rails console

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment