Sha256: 9078da8ef880ac67612453af9e434ee2f2dbc5f58c0b44ee626dea429b3b6f97
Contents?: true
Size: 672 Bytes
Versions: 3
Compression:
Stored size: 672 Bytes
Contents
require 'spec_helper' RSpec.describe 'Retries Exhausted block' do class FooClass < TestWorkerAlternative sidekiq_retries_exhausted do |msg| bar('hello') foo(msg) end def self.bar(input) end def self.foo(msg) end end it 'executes whatever is within the block' do FooClass.within_sidekiq_retries_exhausted_block { expect(FooClass).to receive(:bar).with('hello') } end it 'passes arguments to the block' do args = { 'args' => ['a', 'b']} FooClass.within_sidekiq_retries_exhausted_block(args) do expect(FooClass).to receive(:foo).with(FooClass.default_retries_exhausted_args.merge(args)) end end end
Version data entries
3 entries across 3 versions & 1 rubygems