Sha256: baf39859851c88fe528f76706c17b1ce9b22258047e258a8a7f287bbe38c8cc4
Contents?: true
Size: 602 Bytes
Versions: 22
Compression:
Stored size: 602 Bytes
Contents
RSpec.shared_examples 'Nyauth::Confirmable' do |klass| let!(:instance) { create(klass.name.downcase.to_sym, :requested_confirmation) } describe '#confirm' do subject { instance.confirm } before { Timecop.freeze } after { Timecop.return } it do expect { subject }.to change(instance, :confirmed?).from(false).to(true) end it do expect { subject }.to change(instance, :confirmed_at).from(nil).to(Time.current) end it do expect { subject }.to change(instance, :confirmation_key).to(nil) end end end
Version data entries
22 entries across 22 versions & 1 rubygems