Sha256: 3bb6239215abb3e6948a241fb03f8ac754c92bd174171b8038c0279cca20abfe
Contents?: true
Size: 623 Bytes
Versions: 23
Compression:
Stored size: 623 Bytes
Contents
RSpec.shared_examples_for 'model scoped by a site' do let!(:site) { model.site } it { expect(model).to respond_to(:site) } describe 'touch' do let(:date) { Time.zone.local(2015, 4, 1, 12, 0, 0) } subject { model.save! } it 'updates the updated_at attribute of the site' do Timecop.freeze(date) do expect { subject }.to change { site.updated_at }.to date end end it 'updates the template_version or content_version attribute of the site' do Timecop.freeze(date) do expect { subject }.to change { site.send(attribute) }.to date end end end end
Version data entries
23 entries across 23 versions & 1 rubygems