sonic-pi
https://github.com/sonic-pi-net/sonic-pi
C++
Code. Music. Live.
Minitest::Spec::DSL::InstanceMethods#value
Returns a value monad that has all of Expectations methods
available to it.
Also aliased to #value and #expect for your aesthetic pleasure:
_(1 + 1).must_equal 2
value(1 + 1).must_equal 2
expect(1 + 1).must_equal 2
This method of expectation-based testing is preferable to
straight-expectation methods (on Object) because it stores its
test context, bypassing our hacky use of thread-local variables.
At some point, the methods on Object will be deprecated and then
removed.Edit
git clone [email protected]:sonic-pi-net/sonic-pi.git
cd sonic-pi
open app/server/ruby/vendor/minitest-5.18.1/lib/minitest/spec.rb
Contribute
# Make a new branchgit checkout -b -your-name--update-docs-Minitest--Spec--DSL--InstanceMethods-value-for-pr
# Commit to gitgit add app/server/ruby/vendor/minitest-5.18.1/lib/minitest/spec.rbgit commit -m "better docs for Minitest::Spec::DSL::InstanceMethods#value"
# Open pull requestgem install hub # on a mac you can `brew install hub`
hub fork
git push <your name> -your-name--update-docs-Minitest--Spec--DSL--InstanceMethods-value-for-pr
hub pull-request
# Celebrate!