[rspec-users] more verbosity for be_an?
Rick DeNatale
rick.denatale at gmail.com
Sat Jan 9 13:51:04 EST 2010
On Sat, Jan 9, 2010 at 1:33 PM, rogerdpack <rogerpack2005 at gmail.com> wrote:
>
>> What about something like:
>>
>> expected #<Class:2158174640> => Fixnum to be a kind of Fixnum
Truthfully, I find this much less clear than the original message.
I've got no idea what #<Class:2158174640> => Fixnum means.
Expected Fixnum to be kind of Fixnum makes a lot of sense to me
because I know that x.kind_of? Y means that x is an INSTANCE of Y or
one of it's subclasses, and Fixnum is not a Fixnum but a class.
Pondering this if you don't know that should lead to doing a little
reading and then realizing that you probably wanted
1.should be_a FixNum
instead of
1.class.should be_a Fixnum
--
Rick DeNatale
Blog: http://talklikeaduck.denhaven2.com/
Twitter: http://twitter.com/RickDeNatale
WWR: http://www.workingwithrails.com/person/9021-rick-denatale
LinkedIn: http://www.linkedin.com/in/rickdenatale
More information about the rspec-users
mailing list