test/at_test.rb in clockwork-0.6.0 vs test/at_test.rb in clockwork-0.6.1

- old
+ new

@@ -22,11 +22,11 @@ assert !at.ready?(time_in_day(8, 19)) assert at.ready?(time_in_day(8, 20)) assert !at.ready?(time_in_day(8, 21)) end - test '**:20' do + test '**:20 with two stars' do at = Clockwork::At.parse('**:20') assert !at.ready?(time_in_day(15, 19)) assert at.ready?(time_in_day(15, 20)) assert !at.ready?(time_in_day(15, 21)) @@ -34,11 +34,11 @@ assert !at.ready?(time_in_day(16, 19)) assert at.ready?(time_in_day(16, 20)) assert !at.ready?(time_in_day(16, 21)) end - test '**:20' do + test '*:20 with one star' do at = Clockwork::At.parse('*:20') assert !at.ready?(time_in_day(15, 19)) assert at.ready?(time_in_day(15, 20)) assert !at.ready?(time_in_day(15, 21)) @@ -46,19 +46,39 @@ assert !at.ready?(time_in_day(16, 19)) assert at.ready?(time_in_day(16, 20)) assert !at.ready?(time_in_day(16, 21)) end + test '16:**' do + at = Clockwork::At.parse('16:**') + + assert !at.ready?(time_in_day(15, 59)) + assert at.ready?(time_in_day(16, 00)) + assert at.ready?(time_in_day(16, 30)) + assert at.ready?(time_in_day(16, 59)) + assert !at.ready?(time_in_day(17, 00)) + end + + test '8:**' do + at = Clockwork::At.parse('8:**') + + assert !at.ready?(time_in_day(7, 59)) + assert at.ready?(time_in_day(8, 00)) + assert at.ready?(time_in_day(8, 30)) + assert at.ready?(time_in_day(8, 59)) + assert !at.ready?(time_in_day(9, 00)) + end + test 'Saturday 12:00' do at = Clockwork::At.parse('Saturday 12:00') assert !at.ready?(Time.new(2010, 1, 1, 12, 00)) assert at.ready?(Time.new(2010, 1, 2, 12, 00)) # Saturday assert !at.ready?(Time.new(2010, 1, 3, 12, 00)) assert at.ready?(Time.new(2010, 1, 9, 12, 00)) end - test 'Saturday 12:00' do + test 'sat 12:00' do at = Clockwork::At.parse('sat 12:00') assert !at.ready?(Time.new(2010, 1, 1, 12, 00)) assert at.ready?(Time.new(2010, 1, 2, 12, 00)) assert !at.ready?(Time.new(2010, 1, 3, 12, 00))