mirror of
https://github.com/plashchynski/crono.git
synced 2026-03-27 03:41:38 +01:00
Add Crono.config
This commit is contained in:
@@ -3,7 +3,7 @@ require "spec_helper"
|
||||
describe Crono::Config do
|
||||
describe "#initialize" do
|
||||
it "should initialize schedule" do
|
||||
@config = Crono::Config.instance
|
||||
@config = Crono.config
|
||||
expect(@config.schedule).to be_a(Crono::Schedule)
|
||||
end
|
||||
end
|
||||
|
||||
@@ -6,7 +6,7 @@ end
|
||||
|
||||
describe Crono::PerformerProxy do
|
||||
it "should add job and period to schedule" do
|
||||
expect(Crono::Config.instance.schedule).to receive(:add).with(TestJob, kind_of(Crono::Period))
|
||||
expect(Crono.config.schedule).to receive(:add).with(TestJob, kind_of(Crono::Period))
|
||||
Crono.perform(TestJob).every(2.days, at: "15:30")
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user