sonic-pi

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

C++

Code. Music. Live.

Mocha::ObjectMethods#stubs

Adds an expectation that the specified method may be called any number of times with any parameters.

The original implementation of the method is replaced during the test and then restored at the end of the test. The temporary replacement method has the same visibility as the original method.

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-stubs-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#stubs"


# 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-stubs-for-pr

hub pull-request


# Celebrate!