1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00
mperham--sidekiq/test/test_rails.rb
Mike Perham 53e6b9e2df Test suite overhaul
Remove Redis mocking.  Minimize Redis flushing where possible.
2015-09-23 10:56:37 -07:00

21 lines
446 B
Ruby

require_relative 'helper'
$HAS_AJ = true
begin
require 'active_job'
rescue LoadError
$HAS_AJ = false
end
class TestRails < Sidekiq::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