cleaned up formatting and wording of tests
This commit is contained in:
parent
92e727c09e
commit
0dff0eb087
@ -6,13 +6,13 @@ class OutputAtTest < Test::Unit::TestCase
|
|||||||
setup do
|
setup do
|
||||||
@output = Whenever.cron \
|
@output = Whenever.cron \
|
||||||
<<-file
|
<<-file
|
||||||
every "weekday", :at=>'5:02am' do
|
every "weekday", :at => '5:02am' do
|
||||||
command "blahblah"
|
command "blahblah"
|
||||||
end
|
end
|
||||||
file
|
file
|
||||||
end
|
end
|
||||||
|
|
||||||
should "output the runner using that path" do
|
should "output the command using that time" do
|
||||||
assert_match '2 5 * * 1-5 blahblah', @output
|
assert_match '2 5 * * 1-5 blahblah', @output
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -21,13 +21,13 @@ class OutputAtTest < Test::Unit::TestCase
|
|||||||
setup do
|
setup do
|
||||||
@output = Whenever.cron \
|
@output = Whenever.cron \
|
||||||
<<-file
|
<<-file
|
||||||
every "weekday", :at=>%w(5:02am 3:52pm) do
|
every "weekday", :at => %w(5:02am 3:52pm) do
|
||||||
command "blahblah"
|
command "blahblah"
|
||||||
end
|
end
|
||||||
file
|
file
|
||||||
end
|
end
|
||||||
|
|
||||||
should "output the runner using that path" do
|
should "output the commands for both times given" do
|
||||||
assert_match '2 5 * * 1-5 blahblah', @output
|
assert_match '2 5 * * 1-5 blahblah', @output
|
||||||
assert_match '52 15 * * 1-5 blahblah', @output
|
assert_match '52 15 * * 1-5 blahblah', @output
|
||||||
end
|
end
|
||||||
@ -37,13 +37,13 @@ class OutputAtTest < Test::Unit::TestCase
|
|||||||
setup do
|
setup do
|
||||||
@output = Whenever.cron \
|
@output = Whenever.cron \
|
||||||
<<-file
|
<<-file
|
||||||
every "weekday", :at=>'5:02am, 3:52pm' do
|
every "weekday", :at => '5:02am, 3:52pm' do
|
||||||
command "blahblah"
|
command "blahblah"
|
||||||
end
|
end
|
||||||
file
|
file
|
||||||
end
|
end
|
||||||
|
|
||||||
should "output the runner using that path" do
|
should "output the commands for both times given" do
|
||||||
assert_match '2 5 * * 1-5 blahblah', @output
|
assert_match '2 5 * * 1-5 blahblah', @output
|
||||||
assert_match '52 15 * * 1-5 blahblah', @output
|
assert_match '52 15 * * 1-5 blahblah', @output
|
||||||
end
|
end
|
||||||
@ -53,13 +53,13 @@ class OutputAtTest < Test::Unit::TestCase
|
|||||||
setup do
|
setup do
|
||||||
@output = Whenever.cron \
|
@output = Whenever.cron \
|
||||||
<<-file
|
<<-file
|
||||||
every "weekday", :at=>'5:02am, 3:02pm' do
|
every "weekday", :at => '5:02am, 3:02pm' do
|
||||||
command "blahblah"
|
command "blahblah"
|
||||||
end
|
end
|
||||||
file
|
file
|
||||||
end
|
end
|
||||||
|
|
||||||
should "output the runner using that path" do
|
should "output the command using one entry because the times are aligned" do
|
||||||
assert_match '2 5,15 * * 1-5 blahblah', @output
|
assert_match '2 5,15 * * 1-5 blahblah', @output
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
@ -68,13 +68,13 @@ class OutputAtTest < Test::Unit::TestCase
|
|||||||
setup do
|
setup do
|
||||||
@output = Whenever.cron \
|
@output = Whenever.cron \
|
||||||
<<-file
|
<<-file
|
||||||
every "mon,wed,fri", :at=>'5:02am, 3:02pm' do
|
every "mon,wed,fri", :at => '5:02am, 3:02pm' do
|
||||||
command "blahblah"
|
command "blahblah"
|
||||||
end
|
end
|
||||||
file
|
file
|
||||||
end
|
end
|
||||||
|
|
||||||
should "output the runner using that path" do
|
should "output the command using one entry because the times are aligned" do
|
||||||
assert_match '2 5,15 * * 1,3,5 blahblah', @output
|
assert_match '2 5,15 * * 1,3,5 blahblah', @output
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
Reference in New Issue
Block a user