From e75e185bd348fd21fb62ba77f54d4f27755ba747 Mon Sep 17 00:00:00 2001 From: Patrick J Cherry Date: Thu, 18 Aug 2011 18:19:40 +0100 Subject: Fixed up test_time bits in mauve_notification and merged tests. --- lib/mauve/notification.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'lib/mauve') diff --git a/lib/mauve/notification.rb b/lib/mauve/notification.rb index 8e125be..c57d2a9 100644 --- a/lib/mauve/notification.rb +++ b/lib/mauve/notification.rb @@ -87,10 +87,12 @@ module Mauve protected def hours_in_day(*hours) + @test_time = @time if @test_time.nil? x_in_list_of_y(@test_time.hour, hours.flatten) end def days_in_week(*days) + @test_time = @time if @test_time.nil? x_in_list_of_y(@test_time.wday, days.flatten) end @@ -114,6 +116,7 @@ module Mauve end def working_hours? + @test_time = @time if @test_time.nil? @test_time.working_hours? end @@ -123,6 +126,7 @@ module Mauve # # @return [Boolean] Whether now is a in the dead zone or not. def dead_zone? + @test_time = @time if @test_time.nil? @test_time.dead_zone? end -- cgit v1.2.1