mirror of
https://github.com/mperham/sidekiq.git
synced 2022-11-09 13:52:34 -05:00
ddb0c8b3a8
* Refactor CLI test Extracted 3 main parts: - parse - run - signal handling * Move demonization and pid write from parse to run phase * Move queues default from validate to setup options phase * Add pry-byebug gem * Drop Sidekiq::Test * Require launcher in CLI * Remove TODOs
22 lines
477 B
Ruby
22 lines
477 B
Ruby
# frozen_string_literal: true
|
|
require_relative 'helper'
|
|
|
|
$HAS_AJ = true
|
|
begin
|
|
require 'active_job'
|
|
rescue LoadError
|
|
$HAS_AJ = false
|
|
end
|
|
|
|
class TestRails < Minitest::Test
|
|
|
|
describe 'ActiveJob' do
|
|
it 'does not allow Sidekiq::Worker in AJ::Base classes' do
|
|
ex = assert_raises ArgumentError do
|
|
c = Class.new(ActiveJob::Base)
|
|
c.send(:include, Sidekiq::Worker)
|
|
end
|
|
assert_includes ex.message, "cannot include"
|
|
end if $HAS_AJ
|
|
end
|
|
end
|