Class: RubyReactor::RSpec::SidekiqHelpers::PendingJob

Inherits:
Struct
  • Object
show all
Defined in:
lib/ruby_reactor/rspec/sidekiq_helpers.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

#rawObject

Returns the value of attribute raw

Returns:

  • (Object)

    the current value of raw



26
27
28
# File 'lib/ruby_reactor/rspec/sidekiq_helpers.rb', line 26

def raw
  @raw
end

#worker_classObject

Returns the value of attribute worker_class

Returns:

  • (Object)

    the current value of worker_class



26
27
28
# File 'lib/ruby_reactor/rspec/sidekiq_helpers.rb', line 26

def worker_class
  @worker_class
end

Instance Method Details

#argsObject



32
33
34
# File 'lib/ruby_reactor/rspec/sidekiq_helpers.rb', line 32

def args
  raw["args"]
end

#perform!Object



27
28
29
30
# File 'lib/ruby_reactor/rspec/sidekiq_helpers.rb', line 27

def perform!
  worker_class.jobs.delete(raw)
  worker_class.new.perform(*raw["args"])
end