On Fri, Jan 30, 2009 at 7:38 AM, David Chelimsky <dchelim...@gmail.com>wrote:

> On Fri, Jan 30, 2009 at 9:17 AM, Mark Wilden <m...@mwilden.com> wrote:
> > Avdi Grimm wrote a blog post about why he doesn't stub Time.now and
> instead
> > always injects a clock into his objects. I disagreed, but I can't seem to
> > find the article now.
>
> http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/297660
>

Yeah, I saw that, but he laid out his case in greater depth in a blog post
(i know because I posted a comment disagreeing with it!).

The interesting thing is that Avdi says that stubbing Time.now has broken
some of his tests in the past because of other code (like RSpec) that calls
it. I can't say I've ever run into that myself, but it bears keeping in
mind.

///ark
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to