Skip to content

Instantly share code, notes, and snippets.

@mcasey8540
Created November 17, 2012 02:17
Show Gist options
  • Select an option

  • Save mcasey8540/4092691 to your computer and use it in GitHub Desktop.

Select an option

Save mcasey8540/4092691 to your computer and use it in GitHub Desktop.
rspec_rails
Rspec Notes:
-Add tests before features
rails g rspec:install
rails g integration_test <testname>
rake spec:requests
rake spec:requests
Mimicking User Experience
Forms:
Gemfile
gem 'capybara', :git => <latest git link>
gem 'launchy'
gem 'database_cleaner'
Spec Helper
require 'capybara/rspec'
When testing DB, config.use_transactional_fixtures = false
See Database Cleaner documentation
Resources:
Rails Testing Guide
Capybara
Launchy
Selenium
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment