You're not doing anything wrong. The issue is that creating an NSString doesn't actually ever return an NSString; it's a class cluster, and the actual instantiated class is decided by some super secret Apple algorithm.
If you try this
[[NSString string] isMemberOfClass:[NSString class]];
you'll notice that it returns false. Odd, no? In any case, you can get around this by allowing for subclasses, like so:
[topic title] should be_instance_of([NSString class]).or_any_subclass();
On Wed, Sep 26, 2012 at 11:59 PM, Mikhail Dikov
<mdi...@gmail.com> wrote:
I have the following expectation:
[topic title] should be_instance_of([NSString class]);
However the test fails with an error that <value and (__NSCFString)> is expected to be an instance of <NSString>
What am I doing wrong?