[rspec-users] utc

aslak hellesoy aslak.hellesoy at gmail.com
Mon Mar 12 15:52:50 EDT 2007


On 3/12/07, Jodi Showers <jodi at nnovation.ca> wrote:
> I'm having a helluva time getting Date.today.utc to resolve -
>
> "undefined method `utc' for #<Date: 4908343/2,0,2299161>"
>
> model usage in before_create filter is :
>
>  activated_at = Date.today.utc
>

I'm not sure why you think this is RSpec related.

Check the RDocs for Date - it has no utc method (but Time does).

Aslak

> I'm not stubbing out Date (should I be? [ stub(Date, :utc => Date.today)
> didn't help any ].
>
> The before filter is working fine within the app, but rspec isn't happy.
> Should I include something particular?
>
> Thanx for any help.
>
>
>
> Jodi
>
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list