test/resque/resque_test.rb in resque-throttle-0.1.0 vs test/resque/resque_test.rb in resque-throttle-0.2.0

- old
+ new

@@ -1,6 +1,6 @@ -require 'test_helper.rb' +require '../test_helper.rb' class ResqueTest < Test::Unit::TestCase context "Resque" do setup do @@ -20,9 +20,14 @@ context "job has not reached throttle limit" do should "not add another job to the queue and raise a throttled exception" do Resque.expects(:enqueue_without_throttle).once assert_raises(Resque::ThrottledError) { 2.times { Resque.enqueue(OneHourThrottledJob, @bogus_args) } } end + end + + should "enqueue a job without throttling if the job is disabled" do + Resque.expects(:enqueue_without_throttle).twice + 2.times { Resque.enqueue(DisabledThrottledJob, @bogus_args) } end end end end \ No newline at end of file