sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
Mocha::Mock#quacks_like
Constrains the {Mock} instance so that it can only expect or stub methods to which +responder+ responds. The constraint is only applied at method invocation time.
A +NoMethodError+ will be raised if the +responder+ does not +#respond_to?+ a method invocation (even if the method has been expected or stubbed).
The {Mock} instance will delegate its +#respond_to?+ method to the +responder+.
Note that the methods on +responder+ are never actually invoked.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/mock.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Mocha--Mock-quacks_like-for-pr
# Commit to gitgit add app/server/ruby/vendor/mocha-1.1.0/lib/mocha/mock.rbgit commit -m "better docs for Mocha::Mock#quacks_like"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Mocha--Mock-quacks_like-for-pr
hub pull-request
# Celebrate!