Models
Model Examples live in $RAILS_ROOT/spec/models/ and provide access to fixtures.
Expectations
Model Examples support the following custom expectations.
See Spec::Rails::Expectations for more detail.
Records
Model.should have(:no).records Model.should have(1).record Model.should have(3).records
This is a shortcut for Model.find(:all).length.should == 3.
Errors
model.should have(:no).errors_on(:attribute) model.should have(1).error_on(:attribute) model.should have(3).errors_on(:attribute)