Giter Site home page Giter Site logo

Comments (7)

drewnichols avatar drewnichols commented on July 30, 2024 1

I recommend closing this issue. I was able to get within_sidekiq_retries_exhausted_block working successfully as described in the documentation. The issue described above is because

expect(PostListingsWorker).to receive(:"NotifyMailer.warn_email().deliver_now").with(msg)

should be

expect(NotifyMailer).to receive(:warn_email).with(msg)

from rspec-sidekiq.

gditrick avatar gditrick commented on July 30, 2024

I can't even get this to work with the example given in the docs using rspec 3.x.

from rspec-sidekiq.

chhhris avatar chhhris commented on July 30, 2024

@zhen639 did you ever solve this?

Update - found this answer on SO from Mike Perham, which seems relevant:
http://stackoverflow.com/questions/32874510/how-can-i-test-sidekiq-job-failures

from rspec-sidekiq.

chrishough avatar chrishough commented on July 30, 2024

Was this ever solved?

from rspec-sidekiq.

packrat386 avatar packrat386 commented on July 30, 2024

believe https://github.com/philostler/rspec-sidekiq#within_sidekiq_retries_exhausted_block should work

from rspec-sidekiq.

packrat386 avatar packrat386 commented on July 30, 2024

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 expect(NotifyMailer).to receive(:warn_email) # etc...

from rspec-sidekiq.

paulmthiebauth avatar paulmthiebauth commented on July 30, 2024

+1 to what @packrat386 said here - you'd set the expectation on the NotifyMailer class as opposed to involving the PostListingsWorker

from rspec-sidekiq.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.