I hope everyone is doing well.
I am working on a scheduling system that dealing with Time.now a
lot. It is getting tricky to write test code for the function.
suppose a function in a model:
self.expire_time <= Time.now
i was wondering what is the best way to test it. Or should I say
that I should design the function in the following way (more
def expired?(time) self.expire_time <= time end then I should use it in the following way : object.expired?
it is also easier to write test code.
Any comments and suggestions will be greatly appreciated :)