Sha256: 00e7bda0148800ced698223afae6dfc24bbf25b6bf3477c6dc4bb68677ee70f4
Contents?: true
Size: 925 Bytes
Versions: 1
Compression:
Stored size: 925 Bytes
Contents
require "simplecov" SimpleCov.start require 'bundler/setup' Bundler.setup require 'rails' require 'active_record' require 'timecop' require 'sidekiq' require 'rspec-sidekiq' require 'delayed_cron/railtie' DelayedCron::Railtie.insert RSpec.configure do |config| end def setup(options) DelayedCron.setup do |config| config.default_interval = options[:default_interval] config.cron_jobs = options[:cron_jobs] || [] end end def build_class(class_name, name, options = {}) # setup class and include delayed_cron ActiveRecord::Base.send(:include, DelayedCron::Glue) Object.send(:remove_const, class_name) rescue nil # Set class as a constant klass = Object.const_set(class_name, Class.new(ActiveRecord::Base)) # Setup class with paperclip and delayed paperclip klass.class_eval do include DelayedCron::Glue cron_job name, options def self.test_method end end klass end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
delayed_cron-0.2.9 | spec/spec_helper.rb |