LoginSignup
6
6

More than 5 years have passed since last update.

Ubuntu + RSpec + CapybaraでJavascriptを動かす

Last updated at Posted at 2014-07-25

capybara-webkitをインストール

依存パッケージのインストール

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

Gemfile

gem 'headless'
gem 'capybara-webkit'

support/capybara.rb

Capybara.javascript_driver = :webkit

support/headless.rb

Headless.new.start

Javascriptを有効にする

describe 'some test', js: true do
  # do your test here
end
6
6
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
6
6