Flowdock
method

register_spec_type

Importance_1
Ruby latest stable (v1_9_3_392) - 0 notes - Class: Spec
register_spec_type(*args, &block) public

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
Show source
Register or log in to add new notes.