Sha256: 429d8dbe59ffe86d79facabddcecfeca3a8b28aa7b28462f81d4b541229b21e8

Contents?: true

Size: 1020 Bytes

Versions: 12

Compression:

Stored size: 1020 Bytes

Contents

require 'rubygems'
require 'test/unit'
require 'shoulda'
require 'mocha'

$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
$LOAD_PATH.unshift(File.dirname(__FILE__))
require 'resque/resque'
require 'resque/throttle'
require 'resque/throttled_job'

class Test::Unit::TestCase
end

#fixture classes
class DefaultThrottledJob < Resque::ThrottledJob
  @queue = :some_queue
  
  def self.perform(some_id, some_other_thing)
  end
end

class OneHourThrottledJob < Resque::ThrottledJob
  @queue = :some_queue
  throttle :can_run_every => 3600

  def self.perform(some_id, some_other_thing)
  end
end

class IdentifierThrottledJob < Resque::ThrottledJob
  @queue = :some_queue

  throttle :can_run_every => 3600

  def self.perform(some_id, some_other_thing)
  end
  
  def self.identifier(*args)
    first, second = *args
    "my_#{first}"
  end
end

class DisabledThrottledJob < Resque::ThrottledJob
  @queue = :some_queue
  throttle :disabled => true

  def self.perform(some_id, some_other_thing)
  end
end

Version data entries

12 entries across 12 versions & 2 rubygems

Version Path
resque-throttle-0.3.0 test/test_helper.rb
tech-angels-resque-throttle-0.2.20 test/test_helper.rb
resque-throttle-0.2.19 test/test_helper.rb
resque-throttle-0.2.18 test/test_helper.rb
resque-throttle-0.2.17 test/test_helper.rb
resque-throttle-0.2.16 test/test_helper.rb
resque-throttle-0.2.15 test/test_helper.rb
resque-throttle-0.2.14 test/test_helper.rb
resque-throttle-0.2.13 test/test_helper.rb
resque-throttle-0.2.12 test/test_helper.rb
resque-throttle-0.2.11 test/test_helper.rb
resque-throttle-0.2.10 test/test_helper.rb