-
Notifications
You must be signed in to change notification settings - Fork 133
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How can I test using "within_sidekiq_retries_exhausted_block" with an outside method #85
Comments
I can't even get this to work with the example given in the docs using rspec 3.x. |
@zhen639 did you ever solve this? Update - found this answer on SO from Mike Perham, which seems relevant: |
Was this ever solved? |
Err actually I misread this. I think you need to just set the expectation on the class you're calling. In the example case it'd be |
+1 to what @packrat386 said here - you'd set the expectation on the |
I recommend closing this issue. I was able to get expect(PostListingsWorker).to receive(:"NotifyMailer.warn_email().deliver_now").with(msg) should be expect(NotifyMailer).to receive(:warn_email).with(msg) |
I wanna test "sidekiq_retries_exhausted" in this class:
Here is my test:
But it doesn't work.Here is my log:
So,is there any way to test a method belong to another class during "sidekiq_retries_exhausted"?
The text was updated successfully, but these errors were encountered: