Skip to content

Commit ff46fba

Browse files
committed
Fix spec
1 parent ba6547d commit ff46fba

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

Gemfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,5 @@ end
3434

3535
group :test do
3636
gem 'rack-test'
37+
gem 'timecop'
3738
end

Gemfile.lock

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -83,6 +83,7 @@ GEM
8383
thor (0.20.0)
8484
thread_safe (0.3.6)
8585
tilt (2.0.8)
86+
timecop (0.9.1)
8687
travis-config (1.0.13)
8788
hashr (~> 2.0.0)
8889
tzinfo (1.2.5)
@@ -107,6 +108,7 @@ DEPENDENCIES
107108
sentry-raven
108109
sidekiq (~> 4.0.0)
109110
sinatra (~> 2.0.3)
111+
timecop
110112
travis-config (~> 1.0.0)
111113
travis-support!
112114
yajl-ruby (~> 1.4.0)

spec/spec_helper.rb

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818
c.run_all_when_everything_filtered = true
1919
end
2020

21+
require 'timecop'
22+
Timecop.freeze('2022-01-01 00:02:00 +0200')
23+
2124
module Payloads
2225
def self.load(path)
2326
File.read(File.expand_path("../payloads/#{path}.json", __FILE__))
@@ -28,5 +31,6 @@ def self.load(path)
2831
:type => 'push',
2932
:uuid => Travis.uuid,
3033
:github_guid => 'abc123',
31-
:github_event => 'push'
34+
:github_event => 'push',
35+
:received_at => Time.now
3236
}

0 commit comments

Comments
 (0)