Commit cd82c389 authored by Rémy Coutable's avatar Rémy Coutable

Merge branch 'winh-timecop-frontend-fixtures' into 'master'

Set a fixed date for frontend fixtures

See merge request gitlab-org/gitlab-ce!22672
parents 849778d1 d32e91d0
...@@ -6,6 +6,13 @@ module JavaScriptFixturesHelpers ...@@ -6,6 +6,13 @@ module JavaScriptFixturesHelpers
FIXTURE_PATH = 'spec/javascripts/fixtures'.freeze 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 # Public: Removes all fixture files from given directory
# #
# directory_name - directory of the fixtures (relative to FIXTURE_PATH) # directory_name - directory of the fixtures (relative to FIXTURE_PATH)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment