Module: Rspec::Rails23::Extensions::ActiveRecord

Defined in:
lib/rspec/rails23/extensions/active_record.rb

Instance Method Summary collapse

Instance Method Details

#errors_on(attribute) ⇒ Object Also known as: error_on



6
7
8
9
# File 'lib/rspec/rails23/extensions/active_record.rb', line 6

def errors_on(attribute)
  self.valid?
  [self.errors.on(attribute)].flatten.compact
end