Next: , Previous: , Up: Top   [Contents]

3 How to Write Tests

ERT lets you define tests in the same way you define functions. You can type ert-deftest forms in a buffer and evaluate them there with eval-defun or compile-defun, or you can save the file and load it, optionally byte-compiling it first.

Just like find-function is only able to find where a function was defined if the function was loaded from a file, ERT is only able to find where a test was defined if the test was loaded from a file.