2009-02-16 03:24:10 +00:00
|
|
|
require 'rubygems'
|
|
|
|
require 'test/unit'
|
|
|
|
|
|
|
|
begin
|
|
|
|
require 'shoulda'
|
|
|
|
rescue LoadError
|
|
|
|
warn 'To test Whenever you need the shoulda gem:'
|
|
|
|
warn '$ sudo gem install thoughtbot-shoulda'
|
|
|
|
exit(1)
|
|
|
|
end
|
|
|
|
|
|
|
|
begin
|
|
|
|
require 'mocha'
|
|
|
|
rescue LoadError
|
|
|
|
warn 'To test Whenever you need the mocha gem:'
|
|
|
|
warn '$ sudo gem install mocha'
|
|
|
|
exit(1)
|
|
|
|
end
|
|
|
|
|
|
|
|
require 'whenever'
|
|
|
|
|
|
|
|
module TestExtensions
|
|
|
|
|
|
|
|
def two_hours
|
|
|
|
"0 0,2,4,6,8,10,12,14,16,18,20,22 * * *"
|
|
|
|
end
|
2009-02-17 00:22:37 +00:00
|
|
|
|
2009-02-16 03:24:10 +00:00
|
|
|
end
|
|
|
|
|
|
|
|
class Test::Unit::TestCase
|
|
|
|
include TestExtensions
|
|
|
|
end
|