sonic-pi

https://github.com/sonic-pi-net/sonic-pi

C++

Code. Music. Live.

Mocha::ObjectMethods#unstub

Removes the specified stubbed methods (added by calls to {#expects} or {#stubs}) and all expectations associated with them.

Restores the original behaviour of the methods before they were stubbed. This is normally done automatically at the end of each test, but in some circumstances you may want to do it *before* the end of the test.

WARNING: If you {#unstub} a method which still has unsatisfied expectations, you may be removing the only way those expectations can be satisfied. Use {#unstub} with care.

Source | Google | Stack overflow

Edit

git clone [email protected]:sonic-pi-net/sonic-pi.git

cd sonic-pi

open app/server/ruby/vendor/mocha-1.1.0/lib/mocha/object_methods.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-Mocha--ObjectMethods-unstub-for-pr


# Commit to git

git add app/server/ruby/vendor/mocha-1.1.0/lib/mocha/object_methods.rbgit commit -m "better docs for Mocha::ObjectMethods#unstub"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-Mocha--ObjectMethods-unstub-for-pr

hub pull-request


# Celebrate!