Add PerformerProxy

This commit is contained in:
Dzmitry Plashchynski
2015-03-02 22:03:18 +02:00
parent 2fd061a523
commit 6b185c44ac
4 changed files with 29 additions and 1 deletions

View File

@@ -0,0 +1,13 @@
require "spec_helper"
require "active_job"
class TestJob < ActiveJob::Base
def perform;end
end
describe Periodicity::PerformerProxy do
it "should add job and period to schedule" do
Periodicity.perform(TestJob).every(2.days, at: "15:30")
expect(Periodicity::Config.instance.schedule).to_not be_empty
end
end

View File

@@ -1,7 +1,6 @@
require 'bundler/setup'
Bundler.setup
require 'active_job'
require 'timecop'
require 'periodicity'