
Testing
Get flash to fully experience Pearltrees
Start from scratch - RSpec Rails - RSpec - Relish
RSpec Documentation - Relish
RSpec is a Behaviour-Driven Development tool for Ruby programmers. BDD is an approach to software development that combines Test-Driven Development, Domain Driven Design, and Acceptance Test-Driven Planning. RSpec helps you do the TDD part of that equation, focusing on the documentation and design aspects of TDD.File: README — Documentation by YARD 0.7.2
RSpec Rails 2.6 - RSpec - Relish
RSpec Rails 2.9 rspec-rails extends Rails' built-in testing framework to support rspec examples for requests, controllers, models, views, helpers, mailers and routing. You can choose between webrat or capybara for simulating a browser, automating a browser, or setting expectations using the matchers they supply. Just add your preference to the Gemfile: The documentation for rspec-rails is a work in progress.Tutorials and Related Blog Posts - GitHub
Each factory has a name and a set of attributes. The name is used to guess the class of the object by default, but it's possible to explicitly specify it: # This will guess the User class FactoryGirl . define do factory :user do first_name 'John' last_name 'Doe' admin false end # This will use the User class (Admin would have been guessed) factory :admin , :class => User do first_name 'Admin' last_name 'User' admin true end # The same, but using a string instead of class constant factory :admin , :class => 'user' do first_name 'Admin' last_name 'User' admin true end end It is highly recommended that you have one factory for each class that provides the simplest set of attributes necessary to create an instance of that class.

