README.md in resque_spec-0.4.3 vs README.md in resque_spec-0.5.0
- old
+ new
@@ -44,9 +44,22 @@
end
end
(And I take note of the `before` block that is calling `reset!` for every spec)
+And I might use the `in` statement to specify the queue:
+
+ describe "#recalculate" do
+ before do
+ ResqueSpec.reset!
+ end
+
+ it "adds person.calculate to the Person queue" do
+ person.recalculate
+ Person.should have_queued(person.id, :calculate).in(:people)
+ end
+ end
+
And I might write this as a Cucumber step
Then /the (\w?) has (\w?) queued/ do |thing, method|
thing_obj = instance_variable_get("@#{thing}")
thing_obj.class.should have_queued(thing_obj.id, method.to_sym)