Giter VIP home page Giter VIP logo

Comments (3)

philostler avatar philostler commented on July 24, 2024

Hi there. OK, so your calling Sidekiq::Testing.disable! so you may test against an actual instance of Redis? Your right in that the matcher doesn't cater for that, but your Gist appears to be doing the correct logic to test that scenario.

Your code looks good, would you be willing to start a pull request with that change? I'd like to roll that into the matcher as I can see it being useful for others.

from rspec-sidekiq.

asok avatar asok commented on July 24, 2024

There is one thing to consider. When the job is enqueued with perform_at method the job will be enqueued in the schedule queue. The way to inspect this queue is to simply: ::Sidekiq::ScheduledSet.new.map(&:item). I thought about appending those items to the @actual in the have_enqueued_job matcher. But that would make the corresponding spec file more complicated. So either we refactor the spec file or we add another matcher named have_scheduled_job or something similar.

from rspec-sidekiq.

philostler avatar philostler commented on July 24, 2024

I like the idea of a have_scheduled_job matcher alongside the have_enqueued_job. They are separate enough to warrant a separate matcher and indeed would make for simpler specs. Will have to weight this up against an alternative syntax such as have_enqueued_job#at

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.