Skip to content

Latest commit

 

History

History
26 lines (19 loc) · 1.17 KB

README.md

File metadata and controls

26 lines (19 loc) · 1.17 KB

How to Add New Hooks

Dredd does support new hooks? It's time to extend the Ruby DSL!

In order to enable your new hook:

  1. Determine if the hook is specific to a transaction or applies to all of them
  2. Add the registration and run method to the runner spec
  3. Add the DSL method to the DSL spec
  4. Add the usage example to the Execution order feature
  5. Run the entire test suite and watch the tests fail (start worrying if they don't!)
  6. Add the hook name to the corresponding list in the definitions file
  7. Add the corresponding Dredd event to the events definition (be careful, the hooks order does matter!)
  8. Run the test suite and watch it pass : )

Finally, bump the minor version number, update the README, the CHANGELOG and do anything you need to do in order to release!