Commit d32e91d0 authored by Winnie Hellmann's avatar Winnie Hellmann

Set a fixed date for frontend fixtures

parent 5a727a4d
...@@ -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