Add rake task to check cronotab.rb syntax

This commit is contained in:
Dzmitry Plashchynski
2015-03-18 20:54:16 +02:00
parent dc70212f9d
commit fa97f573e0
5 changed files with 49 additions and 7 deletions
+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