Rspec Cheat Sheet describes how to write tests using RSpec:
- Describe blocks define test contexts for classes, examples are marked with "it", and before blocks run code before each example.
- Object.should and object.should_not compare actual and expected values, with matchers like equal, be_close, be, be_predicate, be_an_instance_of, respond_to, raise_error, include.
- Additional matchers check for counts like have and have_errors_on, or that a block changes an attribute count.