Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

29 lines (22 sloc) 0.672 kb
$:.unshift(File.dirname(__FILE__) + '/../lib')
require 'rubygems'
require 'spec'
require 'logger'
gem 'activerecord', ENV['RAILS_VERSION'] if ENV['RAILS_VERSION']
require 'delayed_job'
require 'sample_jobs'
Delayed::Worker.logger = Logger.new('/tmp/dj.log')
RAILS_ENV = 'test'
# determine the available backends
BACKENDS = []
Dir.glob("#{File.dirname(__FILE__)}/setup/*.rb") do |backend|
begin
backend = File.basename(backend, '.rb')
require "setup/#{backend}"
require "backend/#{backend}_job_spec"
BACKENDS << backend.to_sym
rescue LoadError
puts "Unable to load #{backend} backend! #{$!}"
end
end
Delayed::Worker.backend = BACKENDS.first
Jump to Line
Something went wrong with that request. Please try again.