lib/resque_spec.rb in resque_spec-0.10.0 vs lib/resque_spec.rb in resque_spec-0.11.0
- old
+ new
@@ -41,9 +41,13 @@
def queue_for(klass)
queue_by_name(queue_name(klass))
end
+ def peek(queue_name, start = 0, count = 1)
+ queue_by_name(queue_name).slice(start, count)
+ end
+
def queue_name(klass)
if klass.is_a?(String)
klass = Kernel.const_get(klass) rescue nil
end