[rspec-users] Testing that named_scope is defined

Pat Maddox pergesu at gmail.com
Tue May 13 20:20:18 EDT 2008


On 5/13/08, Jonathan Linowes <jonathan at parkerhill.com> wrote:
>
> On May 13, 2008, at 6:39 PM, Helder Ribeiro wrote:
>
> > I'm not actually trying to test its behavior,
>
>
> quick! Duck! INCOMING...!!!!!
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>

I wonder why OP doesn't create two records, call #most_recent, and
verify that the record returned is the one with the larger timestamp.

If the code is "not yours" (and I think you ought to clarify what you
mean by that), then you should be testing it at a higher level instead
of directly.

Pat


More information about the rspec-users mailing list