Sha256: 3ab42b6ea5f935f9fb1dfc2eb7a7ee55014ed348c16670359bde5e4dc231c7c3

Contents?: true

Size: 396 Bytes

Versions: 2

Compression:

Stored size: 396 Bytes

Contents

require "rspec/time_stop/version"
require "rspec"
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

2 entries across 2 versions & 1 rubygems

Version Path
rspec-time_stop-0.1.1 lib/rspec/time_stop.rb
rspec-time_stop-0.1.0 lib/rspec/time_stop.rb