Skip to content
This repository

Rails Generators for Cucumber with special support for Capybara and DatabaseCleaner

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 config Removed temporary wip profile. March 30, 2013
Octocat-spinner-32 dev_tasks Fix bad path June 25, 2011
Octocat-spinner-32 features
Octocat-spinner-32 lib
Octocat-spinner-32 spec Remove useless "gem 'rspec'" July 27, 2012
Octocat-spinner-32 .gitignore
Octocat-spinner-32 .rspec Use RSpec2 July 06, 2010
Octocat-spinner-32 .travis.yml
Octocat-spinner-32 Gemfile
Octocat-spinner-32 History.md
Octocat-spinner-32 LICENSE Add 2011 July 15, 2011
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
Octocat-spinner-32 cucumber-rails.gemspec
README.md

Cucumber-Rails

Build Status

Cucumber-Rails brings Cucumber to Rails 3.x. For Rails 2x support, see the Cucumber Wiki.

Installation

Before you can use the generator, add the gem to your project's Gemfile as follows:

group :test do
  gem 'cucumber-rails', :require => false
  # database_cleaner is not required, but highly recommended
  gem 'database_cleaner'
end

Then install it by running:

bundle install

Learn about the various options:

rails generate cucumber:install --help

Finally, bootstrap your Rails app, for example:

rails generate cucumber:install

Running Cucumber

With Rake:

rake cucumber

Without Rake:

[bundle exec] cucumber

Bugs and feature requests

The only way to have a bug fixed or a new feature accepted is to describe it with a Cucumber feature. Let's say you think you have found a bug in the cucumber:install generator. Fork this project, clone it to your workstation and check out a branch with a descriptive name:

git clone git@github.com:you/cucumber-rails.git
git checkout -b bug-install-generator

Start by making sure you can run the existing features. Now, create a feature that demonstrates what's wrong. See the existing features for examples. When you have a failing feature that reproduces the bug, commit, push and send a pull request. Someone from the Cucumber-Rails team will review it and hopefully create a fix.

If you know how to fix the bug yourself, make a second commit (after committing the failing feature) before you send the pull request.

Setting up your environment

I strongly recommend rvm and ruby 1.9.3. When you have that, cd into your cucumber-rails repository and:

gem install bundler
bundle install

Running all features

With all dependencies installed, all features should pass:

rake cucumber

One of the features uses MongoDB, which needs to be running in order to make features/mongoid.feature to pass.

Something went wrong with that request. Please try again.