Sha256: 8b653a26a41077cdbceab8b9b87ac9c35a48081e8ebd6f99c7a61a51caa896d2

Contents?: true

Size: 638 Bytes

Versions: 42

Compression:

Stored size: 638 Bytes

Contents

# frozen_string_literal: true
require 'sidekiq/testing'

##
# The Sidekiq inline infrastructure overrides perform_async so that it
# actually calls perform instead. This allows workers to be run inline in a
# testing environment.
#
# This is similar to `Resque.inline = true` functionality.
#
# Example:
#
#   require 'sidekiq/testing/inline'
#
#   $external_variable = 0
#
#   class ExternalWorker
#     include Sidekiq::Worker
#
#     def perform
#       $external_variable = 1
#     end
#   end
#
#   assert_equal 0, $external_variable
#   ExternalWorker.perform_async
#   assert_equal 1, $external_variable
#
Sidekiq::Testing.inline!

Version data entries

42 entries across 42 versions & 3 rubygems

Version Path
sidekiq-5.2.10 lib/sidekiq/testing/inline.rb
sidekiq-5.2.9 lib/sidekiq/testing/inline.rb
sidekiq-5.2.8 lib/sidekiq/testing/inline.rb
sidekiq_cleaner-5.3.8 lib/sidekiq/testing/inline.rb
sidekiq_cleaner-5.3.6 lib/sidekiq/testing/inline.rb
sidekiq-5.2.7 lib/sidekiq/testing/inline.rb
sidekiq-5.2.6 lib/sidekiq/testing/inline.rb
sidekiq-5.2.5 lib/sidekiq/testing/inline.rb
sidekiq-5.2.4 lib/sidekiq/testing/inline.rb
sidekiq-5.2.3 lib/sidekiq/testing/inline.rb
sidekiq-5.2.2 lib/sidekiq/testing/inline.rb
sidekiq-5.2.1 lib/sidekiq/testing/inline.rb
sidekiq-5.2.0 lib/sidekiq/testing/inline.rb
sidekiq-5.1.3 lib/sidekiq/testing/inline.rb
sidekiq-5.1.2 lib/sidekiq/testing/inline.rb
sidekiq-5.1.1 lib/sidekiq/testing/inline.rb
sidekiq-5.1.0 lib/sidekiq/testing/inline.rb
sidekiq-5.0.5 lib/sidekiq/testing/inline.rb
sidekiq-5.0.4 lib/sidekiq/testing/inline.rb
sidekiq-5.0.3 lib/sidekiq/testing/inline.rb