Sha256: 48ce7dff6b3863841b0822cc1f9fcf1d1b476acab231b42a1fd8167323f7da69
Contents?: true
Size: 583 Bytes
Versions: 1
Compression:
Stored size: 583 Bytes
Contents
require_relative 'spec_helper' require 'quantum_leap' describe Quantum do describe '.leap' do the_past = Time.new(1956, 9, 13, 15, 00) it 'changes the current time' do Quantum.leap(the_past) Time.now.must_be_close_to(the_past) end end describe '.leap_back' do the_present = Time.new the_past = Time.new(1972, 6, 15, 15, 00) it 'returns to the present time' do Quantum.leap(the_past) Time.now.must_be_within_delta(the_past, 1) Quantum.leap_back Time.now.must_be_within_delta(the_present, 1) end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
quantum_leap-0.1.0 | spec/quantum_spec.rb |