[rspec-users] Stubbing times: #from_now et al.
mark at mwilden.com
Wed Nov 5 15:10:25 EST 2008
On Wed, Nov 5, 2008 at 11:42 AM, David Chelimsky <dchelimsky at gmail.com>wrote:
> Looks like you can't stub anything on a Fixnum because of the way
> RSpec's mocking works.
> >> require 'spec/mocks'
> => true
> >> 1.stub!(:foo)
> TypeError: no virtual class for Fixnum
What I can't figure out is this:
=> 1 day
Is 1.day an ActiveSupport::Duration or a Fixnum?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the rspec-users