Sha256: 36123570866d26f64c4cbcd6540066ef8e85550ed4b0a6cc387f5c1b242f2d78

Contents?: true

Size: 608 Bytes

Versions: 49

Compression:

Stored size: 608 Bytes

Contents

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

49 entries across 49 versions & 1 rubygems

Version Path
sidekiq-4.1.1 lib/sidekiq/testing/inline.rb
sidekiq-4.1.0 lib/sidekiq/testing/inline.rb
sidekiq-3.5.4 lib/sidekiq/testing/inline.rb
sidekiq-4.0.2 lib/sidekiq/testing/inline.rb
sidekiq-4.0.1 lib/sidekiq/testing/inline.rb
sidekiq-4.0.0 lib/sidekiq/testing/inline.rb
sidekiq-4.0.0.pre2 lib/sidekiq/testing/inline.rb
sidekiq-3.5.3 lib/sidekiq/testing/inline.rb
sidekiq-4.0.0.pre1 lib/sidekiq/testing/inline.rb
sidekiq-3.5.2 lib/sidekiq/testing/inline.rb
sidekiq-3.5.1 lib/sidekiq/testing/inline.rb
sidekiq-3.5.0 lib/sidekiq/testing/inline.rb
sidekiq-3.4.2 lib/sidekiq/testing/inline.rb
sidekiq-3.4.1 lib/sidekiq/testing/inline.rb
sidekiq-3.4.0 lib/sidekiq/testing/inline.rb
sidekiq-3.3.4 lib/sidekiq/testing/inline.rb
sidekiq-3.3.3 lib/sidekiq/testing/inline.rb
sidekiq-3.3.2 lib/sidekiq/testing/inline.rb
sidekiq-3.3.1 lib/sidekiq/testing/inline.rb
sidekiq-3.3.0 lib/sidekiq/testing/inline.rb