Last active
August 29, 2015 14:12
-
-
Save jejacks0n/44d65f18876ba84f7c67 to your computer and use it in GitHub Desktop.
Sidekiq test harness misbehaves.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'sidekiq/testing' | |
require 'sidekiq_override' | |
Sidekiq::Testing.inline! | |
class MyWorker | |
include Sidekiq::Worker | |
@executed = false | |
cattr_accessor :executed | |
def perform | |
self.class.executed = true | |
end | |
end | |
describe 'MyWorker' do | |
it 'executes flawlessly' do | |
MyWorker.perform_async | |
expect(MyWorker.executed).to eq(true) | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Sidekiq::Processor | |
def execute_job(worker, cloned_args) | |
raise('omg') | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment