Sha256: fb2555bd2429d3a9a94b9ab9efca6fb756a3aabb9fb95bf3d0ca8d13abfe7488
Contents?: true
Size: 593 Bytes
Versions: 1
Compression:
Stored size: 593 Bytes
Contents
require "rspec/time_stop/version" require "rspec" require "active_support" begin # workaround for activesupport 7.0.0 # c.f. https://github.com/rails/rails/issues/43851 require "active_support/isolated_execution_state" rescue LoadError end require "active_support/testing/time_helpers" RSpec.shared_context "rspec-time_stop", shared_context: :metadata do include ActiveSupport::Testing::TimeHelpers around(:each) do |example| travel_to(Time.now) do example.run end end end RSpec.configure do |rspec| rspec.include_context "rspec-time_stop", time_stop: true end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
rspec-time_stop-0.1.3 | lib/rspec/time_stop.rb |