Module: MiniTest::English
- Defined in:
- lib/minitest/english.rb
Class Method Summary collapse
- .register(mod, matcher, &block) ⇒ Object
- .register_assertion(matcher, replacement) ⇒ Object
- .register_expectation(matcher, replacement) ⇒ Object
Class Method Details
.register(mod, matcher, &block) ⇒ Object
18 19 20 21 22 23 24 |
# File 'lib/minitest/english.rb', line 18 def register(mod, matcher, &block) validate! mod, matcher, &block REGISTRATIONS[mod][matcher] = block watch mod scan mod true end |
.register_assertion(matcher, replacement) ⇒ Object
8 9 10 11 |
# File 'lib/minitest/english.rb', line 8 def register_assertion(matcher, replacement) matcher, block = parse!(matcher, replacement) register MiniTest::Assertions, matcher, &block end |
.register_expectation(matcher, replacement) ⇒ Object
13 14 15 16 |
# File 'lib/minitest/english.rb', line 13 def register_expectation(matcher, replacement) matcher, block = parse!(matcher, replacement) register MiniTest::Expectations, matcher, &block end |