allow specs to work even when it's between 23:00 and 00:00
authorLunar <lunar@anargeek.net>
Tue, 14 Feb 2012 22:38:31 +0000 (23:38 +0100)
committerLunar <lunar@anargeek.net>
Fri, 24 Feb 2012 18:43:01 +0000 (19:43 +0100)
spec/coquelicot_spec.rb

index 33f3524..00e1a7c 100644 (file)
@@ -237,8 +237,8 @@ describe 'Coquelicot' do
       end
 
       it "should prevent download after the time limit has expired" do
-        # let's be tomorrow
-        Timecop.travel(Date.today + 1) do
+        # let's be the day after tomorrow
+        Timecop.travel(Date.today + 2) do
           get @url
           last_response.status.should eql(410)
         end
@@ -254,8 +254,8 @@ describe 'Coquelicot' do
       url = upload :expire => 60, :file_key => 'test' # 1 hour
       url_name = url.split('/')[-1]
       Dir.glob("#{Coquelicot.depot.path}/*").should have(1).items
-      # let's be tomorrow
-      Timecop.travel(Date.today + 1) do
+      # let's be the day after tomorrow
+      Timecop.travel(Date.today + 2) do
         Coquelicot.depot.gc!
         files = Dir.glob("#{Coquelicot.depot.path}/*")
         files.should have(1).items