spec/qu-spec/matchers_spec.rb in qu-spec-0.1.2 vs spec/qu-spec/matchers_spec.rb in qu-spec-0.2.0
- old
+ new
@@ -72,6 +72,22 @@
context "with #in('queue_name')" do
it { should have_queue_size_of(1).in('people') }
it { should_not have_queue_size_of(1).in('other_people') }
end
end
+
+ describe "#have_scheduled_at" do
+ let(:scheduled_at) { Time.now + 5 * 60 }
+
+ before do
+ Qu.enqueue_at(scheduled_at, Person, first_name, last_name)
+ end
+
+ it "returns true if the arguments are found in the queue" do
+ Person.should have_scheduled_at(scheduled_at, first_name, last_name)
+ end
+
+ it "returns false if the arguments are not found in the queue" do
+ Qu.should_not have_scheduled_at(scheduled_at, last_name, first_name)
+ end
+ end
end