Patch #44455 ยป fix-midnight-test-failure.patch
| test/test_helper.rb | ||
|---|---|---|
|
self.use_transactional_tests = true
|
||
|
self.use_instantiated_fixtures = false
|
||
|
# Freeze the clock for the whole run so that fixtures (e.g. `1.minute.ago`)
|
||
|
# and tests share the same "now" even if the date changes mid-run.
|
||
|
FROZEN_TIME = Time.now
|
||
|
def before_setup
|
||
|
travel_to FROZEN_TIME
|
||
|
super
|
||
|
end
|
||
|
setup do
|
||
|
Redmine::SudoMode.stubs(:enabled?).returns(false)
|
||
|
end
|
||