Module: Spec::Rails::Extensions::ActiveRecord::ClassMethods

Included in:
ActiveRecord::Base
Defined in:
lib/vendor/plugins/rspec-rails/lib/spec/rails/extensions/active_record/base.rb

Instance Method Summary collapse

Instance Method Details

#recordsObject Also known as: record

:call-seq:

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

Extension to enhance should have on AR Model classes



13
14
15
# File 'lib/vendor/plugins/rspec-rails/lib/spec/rails/extensions/active_record/base.rb', line 13

def records
  find(:all)
end