README.md in cucumber-rails-1.4.0 vs README.md in cucumber-rails-1.4.1

- old
+ new

@@ -1,10 +1,13 @@ # Cucumber-Rails [![Build Status](https://secure.travis-ci.org/cucumber/cucumber-rails.png?branch=master)](http://travis-ci.org/cucumber/cucumber-rails) +[![Code Climate](https://codeclimate.com/github/cucumber/cucumber-rails.png)](https://codeclimate.com/github/cucumber/cucumber-rails) +[![Dependency Status](https://gemnasium.com/Kosmas/cucumber-rails.svg)](https://gemnasium.com/Kosmas/cucumber-rails) +[![PullReview stats](https://www.pullreview.com/github/cucumber/cucumber-rails/badges/master.svg?)](https://www.pullreview.com/github/cucumber/cucumber-rails/reviews/master) -Cucumber-Rails brings Cucumber to Rails 3.x and 4.x. For Rails 2.3.x support, see the [rails-2.3.x branch](https://github.com/cucumber/cucumber-rails/tree/rails-2.3.x). +Cucumber-Rails brings Cucumber to Rails 3.x and 4.x. For Rails 2.3.x support, see the [rails-2.3.x branch](https://github.com/cucumber/cucumber-rails/tree/rails-2.3.x). ## Installation Before you can use the generator, add the gem to your project's Gemfile as follows: @@ -33,19 +36,19 @@ rake cucumber Without Rake: [bundle exec] cucumber - + ## Configuration options By default, cucumber-rails runs `DatabaseCleaner.start` and `DatabaseCleaner.clean` before and after your scenarios. You can disable this behaviour like so: # features/support/env.rb # ... Cucumber::Rails::Database.autorun_database_cleaner = false - + ## Upgrading from a previous version When upgrading from a previous version it is recommended that you rerun: rails generate cucumber:install @@ -72,31 +75,41 @@ With all dependencies installed, all specs and features should pass: rake -One of the features uses MongoDB, which needs to be running in order to make features/mongoid.feature to pass. - ### Running Appraisal suite In order to test against multiple versions of key dependencies, the [Appraisal](https://github.com/thoughtbot/appraisal) is used to generate multiple gemfiles, stored in the `gemfiles/` directory. Normally these will only run on Travis; however, if you want to run the full test suite against all gemfiles, run the following commands: - rake gemfiles:install - rake test:all + appraisal install + appraisal rake test To run the suite against a named gemfile, use the following: - rake test:gemfile[rails_3_0] + appraisal rails_4_1 rake test To remove and rebuild the different gemfiles (for example, to update a rails version or its dependencies), use the following: - rake gemfiles:rebuild + appraisal install ### Adding dependencies To support the multiple-gemfile testing, when adding a new dependency the following rules apply: 1. If it's a runtime dependency of the gem, add it to the gemspec 2. If it's a primary development dependency, add it to the gemspec 3. If it's a dependency of a generated rails app in a test, add it to the Gemfile (for local test runs) and each appraisal section (if necessary). For example, rspec is a primary development dependency, so it lives in the gemspec. By contrast, coffee-rails is a dependency of apps generated with rails 3.1 and 3.2, so lives in the main Gemfile and the rails 3.1 and 3.2 appraisal sections. + +### NOTE + +If you get an error while trying to run the tests locally, similar to the one below: + + Could not find a JavaScript runtime. See https://github.com/sstephenson/execjs for a list of available runtimes. (ExecJS::RuntimeUnavailable) + +you would need to install a javascript runtime. + +You can do that in ubuntu by using: + + sudo apt-get install nodejs