From: Robert MannI Date: 2006-05-24T22:53:18+09:00 Subject: Overriding Time.now ------=_Part_11240_7638862.1148478791526 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello! I have a unit test where I need to simulate a different system time. Hence I need Time.now to return a different time than now, say, now + 1 month How can I do this? I tried aliasing Time now, but I don't know how to alias class methods. class Time alias_method 'self.original_now', 'self.now' end How can I alias this --or-- is there any better way to simulate a different time on calling Time.now? Tips and ideas are greatly appreciated, Rob ------=_Part_11240_7638862.1148478791526--