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

Closed
thibaudgg opened this Issue Jun 2, 2010 · 7 comments

Comments

Projects
None yet
3 participants
Contributor

thibaudgg commented Jun 2, 2010

When subject.method return nil, its(:method) return the subject instead of nil to matcher.
Example: http://gist.github.com/422094

Thanks for your great work on RSpec 2!

Contributor

danp commented Jun 3, 2010

Hi,

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.

Contributor

thibaudgg commented Jun 3, 2010

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

Owner

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)

Contributor

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.

Contributor

danp commented Jun 4, 2010

Thank you!

Contributor

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.
3642323

This issue was closed.

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