Commit 9e004c9a authored by Steve Abrams's avatar Steve Abrams

Add not implemented version of set_next_run_at to Schedulable

parent 01bf5655
......@@ -14,4 +14,8 @@ module Schedulable
rescue ActiveRecord::RecordInvalid
update_column(:next_run_at, nil) # update without validation
end
def set_next_run_at
raise NotImplementedError
end
end
......@@ -56,4 +56,19 @@ describe Schedulable do
it_behaves_like 'before_save callback'
it_behaves_like '.runnable_schedules'
end
describe '#next_run_at' do
let(:schedulable_instance) do
Class.new(ActiveRecord::Base) do
include Schedulable
# we need a table for the dummy class to operate
self.table_name = 'users'
end.new
end
it 'works' do
expect { schedulable_instance.set_next_run_at }.to raise_error(NotImplementedError)
end
end
end
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment