mirror of
https://github.com/plashchynski/crono.git
synced 2026-04-24 09:48:39 +02:00
Fix tests
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
require 'bundler/setup'
|
||||
Bundler.setup
|
||||
|
||||
$LOAD_PATH.unshift File.expand_path('../../lib', __FILE__)
|
||||
$LOAD_PATH.unshift File.expand_path('../../lib', __dir__)
|
||||
|
||||
require 'timecop'
|
||||
require 'byebug'
|
||||
@@ -10,14 +10,14 @@ require 'generators/crono/install/templates/migrations/create_crono_jobs.rb'
|
||||
|
||||
# setting default time zone
|
||||
# In Rails project, Time.zone_default equals "UTC"
|
||||
Time.zone_default = Time.find_zone("UTC")
|
||||
Time.zone_default = Time.find_zone('UTC')
|
||||
|
||||
ActiveRecord::Base.establish_connection(
|
||||
adapter: 'sqlite3',
|
||||
database: 'file::memory:?cache=shared'
|
||||
)
|
||||
|
||||
ActiveRecord::Base.logger = Logger.new(STDOUT)
|
||||
ActiveRecord::Base.logger = Logger.new($stdout)
|
||||
CreateCronoJobs.up
|
||||
|
||||
class TestJob
|
||||
@@ -27,6 +27,6 @@ end
|
||||
|
||||
class TestFailingJob
|
||||
def perform
|
||||
fail 'Some error'
|
||||
raise 'Some error'
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user