1
0
Fork 0
mirror of https://github.com/mperham/sidekiq.git synced 2022-11-09 13:52:34 -05:00

Test cleanup

This commit is contained in:
Mike Perham 2012-03-17 21:36:33 -07:00
parent 3ce19eb773
commit b782c05e1b
3 changed files with 7 additions and 6 deletions

View file

@ -1,7 +1,8 @@
require 'rake/testtask'
Rake::TestTask.new(:test) do |test|
test.libs << 'test'
test.warning = true
#SO MUCH NOISE
#test.warning = true
test.pattern = 'test/**/test_*.rb'
end

View file

@ -28,10 +28,6 @@ class TestExtensions < MiniTest::Unit::TestCase
assert_equal 1, Sidekiq.redis.llen('queue:default')
end
it 'allows delayed exection of ActiveRecord instance methods' do
skip('requires a database')
end
class UserMailer < ActionMailer::Base
def greetings(a, b)
raise "Should not be called!"

View file

@ -52,13 +52,17 @@ class TestRetry < MiniTest::Unit::TestCase
@redis = MiniTest::Mock.new
Sidekiq.instance_variable_set(:@redis, @redis)
fake_msg = MultiJson.encode({ 'class' => 'Bob', 'args' => [1,2], 'queue' => 'someq' })
def @redis.with; yield self; end
@redis.expect :zremrangebyscore, [], ['retry', '-inf', String]
@redis.expect :zremrangebyscore, [fake_msg], ['retry', '-inf', String]
@redis.expect :rpush, 1, ['someq', fake_msg]
end
it 'should poll like a bad mother...SHUT YO MOUTH' do
inst = Sidekiq::Retry::Poller.new
inst.poll
@redis.verify
end
end