class ActiveRecord::Base

:nodoc:

def errors_on(attribute)

model.should have(n).errors_on(:attribute)
model.should have(1).error_on(:attribute)
model.should have(:no).errors_on(:attribute)

Extension for should have on AR Model instances
def errors_on(attribute)
  self.valid?
  [self.errors.on(attribute)].flatten.compact
end

def records

ModelClass.should have(n).records
ModelClass.should have(1).record
ModelClass.should have(:no).records

Extension for should have on AR Model classes
def records
  find(:all)
end