What\'s the best way to set Time.now for the purpose of testing time-sensitive methods in a unit test?
Time.now
I'm using RSpec and I did this: Time.stub!(:now).and_return(2.days.ago) before I call Time.now. In that way I'm able to control the time I used for that particular test case