[rspec-users] Spec failing [Possible Bug with kind_of? and instance_of?]

David Chelimsky dchelimsky at gmail.com
Sat Feb 24 10:07:46 EST 2007


On 2/24/07, Scott Taylor <mailing_lists at railsnewbie.com> wrote:
>
> I have a spec which is failing, but I just can't say why.  Maybe I'm
> missing something painfully obvious?
>
> Here is the pastie of the results & the spec:
>
> http://pastie.caboo.se/42626
>
> The spec to look for is "should have an array of users"  I've printed
> out ("puts'ed") to the terminal the fact that the values are
> *opposite* to what the spec fails on...

This is a bug related to the underscore sugar and Active Record, and
is one of the many reasons we are eliminating the underscore sugar. If
you use 0.8.0-RC1 or the current trunk, you can do this:

@bdd.users.should be_an_instance_of(Array)

and it will pass.

Cheers,
David

>
> Thanks, all, for your help,
>
> Best Regards,
>
> Scott Taylor
>
>
> P.S.  In the future shall I just plop in a bunch of code to my
> message, or is pastie a good means for delivering somewhat large
> chunks of code?
> _______________________________________________
> rspec-users mailing list
> rspec-users at rubyforge.org
> http://rubyforge.org/mailman/listinfo/rspec-users
>


More information about the rspec-users mailing list