its(:method) problem when subject.method return nil #31

thibaudgg opened this Issue Jun 2, 2010 · 7 comments


None yet
3 participants

thibaudgg commented Jun 2, 2010

When subject.method return nil, its(:method) return the subject instead of nil to matcher.

Thanks for your great work on RSpec 2!


danp commented Jun 3, 2010


Should be fixed by this commit: [dpiddy@6e2e245727fef5014aecc48640e48570fe008565]

As dchelimsky informed me I didn't put the specs in the right place. For what it's worth, the last one I added did show the issue was fixed by my patch. I'll try to get them where they need to go.


thibaudgg commented Jun 3, 2010

Ok thanks for your patch, I hope it'll pulled on beta.11 :-)


dchelimsky commented Jun 4, 2010

@dpiddy - are you planning to add specs? If not, I'll take care of it because I'd like to get this in beta 11 (which is coming in the next couple of days)


danp commented Jun 4, 2010

I'd say go for it; I didn't see any reference to its() to get started with in the specs you pointed me to so it'd take me a bit to get my bearings.


danp commented Jun 4, 2010

Thank you!


thibaudgg commented Jun 4, 2010

Great, thank you!

@timcharper timcharper pushed a commit to timcharper/rspec-core that referenced this issue Aug 19, 2011

@danp @dchelimsky danp + dchelimsky don't give up on the attribute subject just because it returns nil
Closes #31.

This issue was closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment