makandra/spreewald

Modernize time steps

judithroth opened this issue ยท 2 comments

The time steps in Spreewald rely on the Timecop gem.
Since 4.1 Active Support has its own time travel functionality, that seems to cover all the usecases that Spreewald offers (travel, travel_to, freeze_time. Since almost all our projects already include Active Support we should switch to that.

๐Ÿ‘ for switching to Active Support
๐Ÿ‘Ž for keeping Timecop

We still have a few projects in active development that are on Rails 3.2 LTS. You cannot upgrade ActiveSupport without upgrading Rails. Because of this it's a ๐Ÿ‘Ž from me.

We've discussed this and will implement as follows:

  • When Timecop is available, we will use Timecop
  • When Timecop is unavailable, but ActiveSupport time helpers are available, we will use them
  • If neither is available, time steps will be undefined. This is similar to the current behavior where steps are undefined when Timecop is unavailable.