[minor] improved documentation for change method #51

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
2 participants
@joliss
Contributor

joliss commented Dec 19, 2010

The documentation for change confused me, so I added a paragraph at the bottom:

# :call-seq:
#   should change(receiver, message, &block)
#   should change(receiver, message, &block).by(value)
#   should change(receiver, message, &block).from(old).to(new)
#   should_not change(receiver, message, &block)
#
# Allows you to specify that a Proc will cause some value to change.
#
# You can either pass <tt>receiver</tt> and <tt>message</tt>, or a block,
# but not both.

There's an obscure feature that lets you write change(nil, 'my result') { ... } to get a custom message, but I don't think it's worth cluttering the docs with this.

This is my first pull request ever -- let me know if I'm doing it right, please! :-)

@joliss

This comment has been minimized.

Show comment
Hide comment
@joliss

joliss Dec 19, 2010

Contributor

improved documentation for change method

Contributor

joliss commented Dec 19, 2010

improved documentation for change method

@dchelimsky

This comment has been minimized.

Show comment
Hide comment
@dchelimsky

dchelimsky Dec 19, 2010

Member

@jo - you did this perfectly! Thanks. You also drew my attention to the docs, so I made some further changes in the next commit: 9059239. Please let me know if you think it helps clarify things.

Member

dchelimsky commented Dec 19, 2010

@jo - you did this perfectly! Thanks. You also drew my attention to the docs, so I made some further changes in the next commit: 9059239. Please let me know if you think it helps clarify things.

@joliss

This comment has been minimized.

Show comment
Hide comment
@joliss

joliss Dec 19, 2010

Contributor

Cool, thank you so much! Yes, I think it looks much clearer now. :)

Contributor

joliss commented Dec 19, 2010

Cool, thank you so much! Yes, I think it looks much clearer now. :)

@dchelimsky

This comment has been minimized.

Show comment
Hide comment
@dchelimsky

dchelimsky Dec 19, 2010

Member

Great. Please feel free to submit more documentation patches like this. RSpec's documentation (or lack thereof) is probably the biggest pain point for newbies and people upgrading from RSpec 1 to RSpec 2, so any help improving that situation is much appreciated.

Member

dchelimsky commented Dec 19, 2010

Great. Please feel free to submit more documentation patches like this. RSpec's documentation (or lack thereof) is probably the biggest pain point for newbies and people upgrading from RSpec 1 to RSpec 2, so any help improving that situation is much appreciated.

kchien pushed a commit to kchien/rspec-expectations that referenced this pull request Mar 7, 2014

This issue was closed.

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