From e2c30ca2991dfc7e95a309c21d7c48520c5f2f54 Mon Sep 17 00:00:00 2001 From: Javan Makhmali Date: Mon, 13 Jul 2009 16:24:23 -0400 Subject: [PATCH] Added failing test to show problem with #combine method when two commands are in one every statement --- test/output_command_test.rb | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/test/output_command_test.rb b/test/output_command_test.rb index ff9005c..a971681 100644 --- a/test/output_command_test.rb +++ b/test/output_command_test.rb @@ -84,4 +84,21 @@ class OutputCommandTest < Test::Unit::TestCase end end + context "An every statement with two commands in it" do + setup do + @output = Whenever.cron \ + <<-file + every 1.hour do + command "first" + command "second" + end + file + end + + should "output both commands" do + assert_match "0 * * * * first", @output + assert_match "0 * * * * second", @output + end + end + end \ No newline at end of file