From b2aba24ff323eeb7810c4ae951f7ea79cb9d9ac7 Mon Sep 17 00:00:00 2001 From: Ilya Katz Date: Thu, 23 Jul 2015 17:15:16 -0400 Subject: [PATCH] Document ability to specify count for enqueued job --- README.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/README.md b/README.md index 6b778d6..db6c9ad 100644 --- a/README.md +++ b/README.md @@ -139,6 +139,20 @@ describe "#recalculate" do end ``` +You can validate the number of times that a job was scheduled + +```ruby +describe "#recalculate" do + it "adds person.calculate to the Person queue" do + person.recalculate + expect(Person).to have_queued(person.id, :calculate).once + # or + expect(Person).to have_queued(person.id, :calculate).times(1) + end +end +``` + + Turning off ResqueSpec and calling directly to Resque ----------------------------------------------------- @@ -206,6 +220,8 @@ describe "#welcome_email" do end ``` + + resque-scheduler with Specs ==========================