change to args which will be passed to Job#perform

This commit is contained in:
Jannis Hübl
2016-01-14 09:33:14 +01:00
parent dd4f92b569
commit 89f3b9a8a1
6 changed files with 30 additions and 30 deletions

View File

@@ -19,9 +19,9 @@ describe Crono::PerformerProxy do
Crono.perform(TestJob).once_per 10.minutes
end
it 'should add job with data to schedule' do
expect(Crono::Job).to receive(:new).with(TestJob, kind_of(Crono::Period), {some: 'data'})
it 'should add job with args to schedule' do
expect(Crono::Job).to receive(:new).with(TestJob, kind_of(Crono::Period), [:some, {some: 'data'}])
allow(Crono.scheduler).to receive(:add_job)
Crono.perform(TestJob, {some: 'data'}).every(2.days, at: '15:30')
Crono.perform(TestJob, :some, {some: 'data'}).every(2.days, at: '15:30')
end
end