You can clone with
Is it just me, or wouldn't it be better to have this https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/testing.rb implemented at the Sidekiq::Client level instead https://github.com/mperham/sidekiq/blob/master/lib/sidekiq/client.rb ?
Think about the situation where you call Sidekiq::Client.push in your code - or just use the resque compatibility helpers...
Yeah, we should probably just have testing helpers which override Sidekiq::Client.raw_push. The Client impl has been refactored over the last year - it wasn't totally stable - so this is possible now. Probably something for Sidekiq 3.0 since I'm sure it will break some people's testing code.
@NielsKSchjoedt did you write some code in this direction? I'm having problems to retrieve :jid from client_push method override by sidekiq/testing. It always returns true.
No sorry, I didn't :-(
Update sidekiq/testing to execute almost all of the client api, fixes #…
This should ensure tests reproduce a maximum amount of the implementation details that you'll see in production.