[rspec-users] more verbosity for be_an?

rogerdpack rogerpack2005 at gmail.com
Wed Dec 30 18:27:34 EST 2009

> What about something like:
>   expected #<Class:2158174640> => Fixnum to be a kind of Fixnum
> That is more aligned with other failure messages. WDYT?

I quite like it.
In this instance it was

3.class.should be_a Fixnum # fails

I suppose it would be something like
expected #<Class:Fixnum> => Class to be a kind of Fixnum


> And just out of curiosity, Roger, what's your use case?  I can't remember ever using be_a/be_an, at least not in any code that has survived.

The very first test I thought up was "this method should return an
integer" so kind of a basic test for a not yet existent method.


More information about the rspec-users mailing list