DEV Community

Discussion on: How to RSpec your sidekiq-scheduler

Collapse
 
exocode profile image
Jan

Just wanna mention, that sidekiq-scheduler support more options than cron: only: there is also every:, in:, at:. To not having failing specs you could add these options too:


  describe "cron syntax" do
    schedule.each do |k, v|
      cron = v["cron"] || v["every"] || v["at"] || v["in"]
      it "#{k} has correct cron syntax" do
        expect { Fugit.do_parse(cron) }.not_to raise_error
      end
    end
  end

Enter fullscreen mode Exit fullscreen mode