[rspec-users] more verbosity for be_an?
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
1.class.should be_a Fixnum
More information about the rspec-users