Last active
August 29, 2015 14:26
-
-
Save RadoMark/346875f5b18ca817778b to your computer and use it in GitHub Desktop.
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
# RSpec configuration | |
RSpec.configure do |config| | |
config.around(:each) do |example| | |
Sidekiq::Testing.inline!(&example) | |
end | |
config.around(:each, sidekiq: :fake) do |example| | |
Sidekiq::Testing.fake!(&example) | |
end | |
config.around(:each, sidekiq: :disable) do |example| | |
Sidekiq::Testing.disable!(&example) | |
end | |
end | |
# Specs | |
it 'queues sidekiq worker', sidekiq: :fake do | |
# THE code called with Sidekiq::Testing.fake!(&example) around | |
end | |
it 'queues sidekiq worker', sidekiq: :disable do | |
# THE codec called with Sidekiq::Testing.disable!(&example) around | |
end | |
it 'queues sidekiq worker' do | |
# THE code called with Sidekiq::Testing.inline!(&example) around | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment