shared_examples_for'throttled touch'dodescribe'#touch'doit'updates the updated_at timestamp'doTimecop.freezedosubject.touchexpect(subject.updated_at).toeq(Time.zone.now)endendit'updates the object at most once per minute'dofirst_updated_at=Time.zone.now-(ThrottledTouch::TOUCH_INTERVAL*2)second_updated_at=Time.zone.now-(ThrottledTouch::TOUCH_INTERVAL*1.5)Timecop.freeze(first_updated_at){subject.touch}Timecop.freeze(second_updated_at){subject.touch}expect(subject.updated_at).toeq(first_updated_at)endendend