Add support for Timecop 0.9.9 so that we could track proper tests' execution time when Process.clock_gettime is mocked.
Changes
Knapsack Pro ignores the Process.clock_gettime mocked by the Timecop gem.
Checklist reminder
[x] You added the changes to the UNRELEASED section of the CHANGELOG.md, including the needed bump (ie, patch, minor, major)
[x] You follow the architecture outlined below for RSpec in Queue Mode, which is a work in progress (feel free to propose changes):
Pure: lib/knapsack_pro/pure/queue/rspec_pure.rb contains pure functions that are unit tested.
Extension: lib/knapsack_pro/extensions/rspec_extension.rb encapsulates calls to RSpec internals and is integration and e2e tested.
Runner: lib/knapsack_pro/runners/queue/rspec_runner.rb invokes the pure code and the extension to produce side effects, which are integration and e2e tested.
Story
link to the internal story
Related
Changes introduced by Timecop 0.9.9:
Process.clock_gettime is mocked.
Timecop 0.9.10 makes
Process.clock_gettime
optionally mocked. The default isTimecop.mock_process_clock = false
.Our old PRs related to time tracking and mocking time:
Description
Add support for Timecop 0.9.9 so that we could track proper tests' execution time when
Process.clock_gettime
is mocked.Changes
Process.clock_gettime
mocked by the Timecop gem.Checklist reminder
UNRELEASED
section of theCHANGELOG.md
, including the needed bump (ie, patch, minor, major)lib/knapsack_pro/pure/queue/rspec_pure.rb
contains pure functions that are unit tested.lib/knapsack_pro/extensions/rspec_extension.rb
encapsulates calls to RSpec internals and is integration and e2e tested.lib/knapsack_pro/runners/queue/rspec_runner.rb
invokes the pure code and the extension to produce side effects, which are integration and e2e tested.