Problem
According to the ‘Cucumber book’ the gems required to start using cucumber with a rails application are the following:
1 2 3 4 5 6 7 8 9 |
group :test do gem 'cucumber-rails', '1.2.1' gem 'rspec-rails', '2.7.0' gem 'database_cleaner', '0.7.0' end |
On the most recent rails version (currently 3.2.9) the gems need to be updated and also include the javascript runtime gem ‘therubyracer’
Solution
The following gems are working with Rails 3.2.9
1 2 3 4 5 6 7 |
group :test do gem 'cucumber-rails', '~> 1.3.0' gem 'rspec-rails', '~> 2.12.0' gem 'database_cleaner', '~> 0.9.1' # Add javascript runtime environment gem "therubyracer", "~> 0.10.2" end |
You can then run the
1 |
$ rails g cucumber:install |
command to generate the files and folders necessary for cucumber.