Sha256: c168a27db09e83110df141c1765df484b34d284c7badebee9d2ab97dc42e1ef2
Contents?: true
Size: 1.11 KB
Versions: 11
Compression:
Stored size: 1.11 KB
Contents
require 'spec_helper' describe 'A timestamped model' do context 'A model' do subject(:model) { double('Mock model') } before :each do attrs.each do |attr| model.stub(attr) end end context 'that is a timestamped model' do let(:attrs) { [:id, :created_at, :updated_at, :deleted_at] } it_behaves_like 'a timestamped model' end context 'without an id' do let(:attrs) { [:created_at, :updated_at, :deleted_at] } it 'should not behave like a timestamped model' do pending end end context 'without an created_at' do let(:attrs) { [:id, :updated_at, :deleted_at] } it 'should not behave like a timestamped model' do pending end end context 'without an updated_at' do let(:attrs) { [:id, :created_at, :deleted_at] } it 'should not behave like a timestamped model' do pending end end context 'without an deleted_at' do let(:attrs) { [:id, :created_at, :updated_at] } it 'should not behave like a timestamped model' do pending end end end end
Version data entries
11 entries across 11 versions & 1 rubygems