Skip to content
Test base with cucumber, capybara, rspec and selenium or headless webkit
Find file
Latest commit 183fb3c @isa Just pushing to github
Failed to load latest commit information.
test/features Just pushing to github
.gitignore Just pushing to github
.rvmrc Just pushing to github
.rvmrc_jruby Just pushing to github
Gemfile Just pushing to github Just pushing to github

Test Setup

Basic test base setup with cucumber, capybara, selenium, capybara-webkit, headless and rspec.

First thing to do is installing ruby or jruby. You can do this by:

rvm install ruby-1.8.7
rvm install jruby-

I setup two different rvmrc files, so you can pick either of them. By default it is ruby.

Another thing you should install prior to use this base is:

brew install qt chromedriver


Well, after getting into the directory, all you need to do is just installing the gems:

bundle install

And then create your tests by following the example and run them as below:

bundle exec cucumber test/features


Same goes here:

jruby -S bundle install

and execute your tests with:

jruby -S bundle exec cucumber test/features

WebKit Headless Testing

Normally, base is setup to use selenium out-of-the-box. However, if you would like to do the headless testing, make sure you are changing the env.rb file under test/features/support folder as following:

Capybara.default_driver = :webkit
Capybara.javascript_driver = :webkit
Something went wrong with that request. Please try again.