Created
June 11, 2012 10:49
-
-
Save arnab/2909535 to your computer and use it in GitHub Desktop.
Set up Rails 3.2 with Rspec and Cucumber
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Works with Rails 3.2.x (and this keeps changing due to the large amounts of gems and their author's philosophies differing all the time) | |
# 1. Create new Rails app | |
rails new <thing> --skip-testunit | |
# 2. Add the following to Gemfile: | |
group :development, :test do | |
gem 'rspec-rails' | |
gem 'cucumber-rails', :require => false | |
gem 'database_cleaner', :require => false | |
gem 'capybara' | |
end | |
# 3. install required gems via bundler | |
bundle install | |
# 4. Generate rspec stuff | |
rails g rspec:install | |
5. Make rspec the default for newly generated stuff | |
# in config/applicaton.rb | |
config.generators do |g| | |
g.test_framework :rspec | |
end | |
# 5. Generate cucumber stuff | |
rails g cucumber:install —rspec —capybara |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment