RSpec::Matchers.define:be_like_timedo|expected|matchdo|actual|expect(actual).tobe_within(1.second).of(expected)enddescriptiondo"within one second of #{expected}"endfailure_messagedo|actual|"expected #{actual} to be within one second of #{expected}"endend