diff options
author | Rémy Coutable <remy@rymai.me> | 2018-12-10 16:01:10 +0000 |
---|---|---|
committer | Rémy Coutable <remy@rymai.me> | 2018-12-10 16:01:10 +0000 |
commit | cd82c38916915d96a4de8c7f7f269c43454d9a75 (patch) | |
tree | 8632b53482438fe13ab79fa2b5c6129b49fd148b /spec | |
parent | 849778d146add869f4ef0528eea0ca2e115db1fa (diff) | |
parent | d32e91d0cf4553175371881e5ecbc8a2bab6d2a2 (diff) | |
download | gitlab-ce-cd82c38916915d96a4de8c7f7f269c43454d9a75.tar.gz |
Merge branch 'winh-timecop-frontend-fixtures' into 'master'
Set a fixed date for frontend fixtures
See merge request gitlab-org/gitlab-ce!22672
Diffstat (limited to 'spec')
-rw-r--r-- | spec/support/helpers/javascript_fixtures_helpers.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/spec/support/helpers/javascript_fixtures_helpers.rb b/spec/support/helpers/javascript_fixtures_helpers.rb index 086a345dca8..89c5ec7a718 100644 --- a/spec/support/helpers/javascript_fixtures_helpers.rb +++ b/spec/support/helpers/javascript_fixtures_helpers.rb @@ -6,6 +6,13 @@ module JavaScriptFixturesHelpers FIXTURE_PATH = 'spec/javascripts/fixtures'.freeze + def self.included(base) + base.around do |example| + # pick an arbitrary date from the past, so tests are not time dependent + Timecop.freeze(Time.utc(2015, 7, 3, 10)) { example.run } + end + end + # Public: Removes all fixture files from given directory # # directory_name - directory of the fixtures (relative to FIXTURE_PATH) |