Sha256: d7cd2a8da31ca7fa92e4ed92ade456cf75ee3665caed11b5e96fea414c9dcfdc

Contents?: true

Size: 639 Bytes

Versions: 20

Compression:

Stored size: 639 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

20 entries across 20 versions & 1 rubygems

Version Path
sidekiq-6.4.1 lib/sidekiq/testing/inline.rb
sidekiq-6.4.0 lib/sidekiq/testing/inline.rb
sidekiq-6.3.1 lib/sidekiq/testing/inline.rb
sidekiq-6.3.0 lib/sidekiq/testing/inline.rb
sidekiq-6.2.2 lib/sidekiq/testing/inline.rb
sidekiq-6.2.1 lib/sidekiq/testing/inline.rb
sidekiq-6.2.0 lib/sidekiq/testing/inline.rb
sidekiq-6.1.3 lib/sidekiq/testing/inline.rb
sidekiq-6.1.2 lib/sidekiq/testing/inline.rb
sidekiq-6.1.1 lib/sidekiq/testing/inline.rb
sidekiq-6.1.0 lib/sidekiq/testing/inline.rb
sidekiq-6.0.7 lib/sidekiq/testing/inline.rb
sidekiq-6.0.6 lib/sidekiq/testing/inline.rb
sidekiq-6.0.5 lib/sidekiq/testing/inline.rb
sidekiq-6.0.4 lib/sidekiq/testing/inline.rb
sidekiq-6.0.3 lib/sidekiq/testing/inline.rb
sidekiq-6.0.2 lib/sidekiq/testing/inline.rb
sidekiq-6.0.1 lib/sidekiq/testing/inline.rb
sidekiq-6.0.0 lib/sidekiq/testing/inline.rb
sidekiq-6.0.0.pre1 lib/sidekiq/testing/inline.rb