[Rails] Re: Mock today

2008-11-19 Thread Eric LIn
Thanks, both of these are good suggestions. I will look into them. On Nov 19, 12:43 pm, Rob Biedenharn <[EMAIL PROTECTED]> wrote: > On Nov 19, 2008, at 3:37 PM, Frederick Cheung wrote: > > > > > On Nov 19, 8:20 pm, Eric LIn <[EMAIL PROTECTED]> wrote: > >&g

[Rails] Mock today

2008-11-19 Thread Eric LIn
In some of my unit tests, I find the need to set today to a different value than the actual today. For example, to test the model method "balance_of_today", which takes no argument, I want to have Date.today be a specific date for the purpose of testing. In other words, I want to do something lik