test/test_helper.rb in resque-state-1.0.4 vs test/test_helper.rb in resque-state-1.1.0
- old
+ new
@@ -70,9 +70,23 @@
at(num, 100, "At #{num} of 100")
end
end
end
+class RevertJob
+ include Resque::Plugins::State
+
+ def perform
+ Resque.redis.set("#{uuid}:iterations", 0)
+ 100.times do |num|
+ Resque.redis.incr("#{uuid}:iterations")
+ at(num, 100, "At #{num} of 100")
+ end
+ end
+
+ def on_revert; end
+end
+
class BasicJob
include Resque::Plugins::State
end
class FailureJob