Class: SidekiqUniqueJobs::Config

Inherits:
OpenStruct
  • Object
show all
Defined in:
lib/sidekiq_unique_jobs/config.rb

Instance Method Summary collapse

Instance Method Details

#inline_testing_enabled?Boolean

Returns:

  • (Boolean)

5
6
7
# File 'lib/sidekiq_unique_jobs/config.rb', line 5

def inline_testing_enabled?
  testing_enabled? && Sidekiq::Testing.inline?
end

#mocking?Boolean

Returns:

  • (Boolean)

9
10
11
# File 'lib/sidekiq_unique_jobs/config.rb', line 9

def mocking?
  redis_test_mode.to_sym == :mock
end

#testing_enabled?Boolean

Returns:

  • (Boolean)

13
14
15
# File 'lib/sidekiq_unique_jobs/config.rb', line 13

def testing_enabled?
  Sidekiq.const_defined?(TESTING_CONSTANT, false) && Sidekiq::Testing.enabled?
end