[rspec-users] Stubbing times: #from_now et al.
mark at mwilden.com
Wed Nov 5 15:39:36 EST 2008
On Wed, Nov 5, 2008 at 12:26 PM, Nick Hoffman <nick at deadorange.com> wrote:
> On 2008-11-05, at 15:10, Mark Wilden wrote:
>> What I can't figure out is this:
>> >> 1.day
>> => 1 day
>> >> 1.day.class
>> => Fixnum
>> I've no idea why 1.day.class returns Fixnum though..
Yeah, I'd looked at the code. Why #class returns Fixnum was my question,
actually. Something to do with coercion, maybe.
The other thing is that if it were simply a Duration, I'd expect you to be
able to stub it.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users