Add rake task to check cronotab.rb syntax

This commit is contained in:
Dzmitry Plashchynski committed 2015-03-18 20:54:16 +02:00
1 parent dc70212f9d
commit fa97f573e0
5 files changed
+49 -7

No files matched your search

+12
View File
@@ -0,0 +1,12 @@
# This is an example of a bad cronotab for tests
class TestJob
def perform
puts 'Test!'
end
end
# This is an error, because you can use `on` options with
# a period less than 7 days.
Crono.perform(TestJob).every 5.days, on: :sunday
+9
View File
@@ -0,0 +1,9 @@
# This is an example of a good cronotab for tests
class TestJob
def perform
puts 'Test!'
end
end
Crono.perform(TestJob).every 5.seconds