Module: RSpec::Timecop::Helpers
- Defined in:
- lib/rspec/timecop/helpers.rb
Overview
Helper which will be include by default, and provide the ‘timecopped` help in all examples.
Instance Method Summary collapse
Instance Method Details
#timecopped(time) ⇒ Object
8 9 10 11 12 |
# File 'lib/rspec/timecop/helpers.rb', line 8 def timecopped(time) result = nil ::Timecop.freeze(time) { result = yield } result end |