sonic-pi

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

C++

Code. Music. Live.

Minitest::Spec::DSL#register_spec_type

Register a new type of spec that matches the spec's description.
This method can take either a Regexp and a spec class or a spec
class and a block that takes the description and returns true if
it matches.

Eg:

    register_spec_type(/Controller$/, Minitest::Spec::Rails)

or:

    register_spec_type(Minitest::Spec::RailsModel) do |desc|
      desc.superclass == ActiveRecord::Base
    end

Source | Google | Stack overflow

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 branch

git checkout -b -your-name--update-docs-Minitest--Spec--DSL-register_spec_type-for-pr


# Commit to git

git add app/server/ruby/vendor/minitest-5.18.1/lib/minitest/spec.rbgit commit -m "better docs for Minitest::Spec::DSL#register_spec_type"


# Open pull request

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

hub fork

git push <your name> -your-name--update-docs-Minitest--Spec--DSL-register_spec_type-for-pr

hub pull-request


# Celebrate!