# in Gemfile
gem 'rails', '3.1.1'
gem 'haml'
gem 'haml-rails', :group => :development
group :test do
gem 'pickle'
gem 'launchy'
gem 'database_cleaner'
gem 'rails3-generators'
gem 'rspec-rails', :require => false
gem 'factory_girl_rails'
gem 'cucumber-rails'
gem 'capybara', '~> 1.0.1'
gem 'capybara-webkit', :git => 'git://github.com/thoughtbot/capybara-webkit.git', :branch => '1.0'
end
bundle install
# in config/application.rb
config.generators do |g|
g.test_framework :rspec, :views => false, :fixture => true
g.fixture_replacement :factory_girl, :dir => 'spec/factories'
g.template_engine :haml
end
In Rails 3+, the lib directory is no longer autoloaded.
# in config/application.rb
config.autoload_paths += %W(#{config.root}/lib)
config.autoload_paths += Dir["#{config.root}/lib/**/"]
rails g cucumber:install --capybara
rails g pickle --paths --email
rails g rspec:install
# in features/support/env.rb
Capybara.default_selector = :css
Capybara.javascript_driver = :webkit
Capybara.ignore_hidden_elements = true