0

What I tried:

Cloned a package with ert tests (https://github.com/dgutov/robe )
# sidenote this package was previously installed using use-package
emacs ~/robe/core-tests.el
M-x ert

Selector: t Passed: 0 Failed: 0 Skipped: 0 Total: 0/0 Started at: 2019-11-10 12:31:14-0800 Finished. Finished at: 2019-11-10 12:31:14-0800

This feels wrong because obviously the package has more than 0 tests.

Also btw: how do I run tests in "emacs -batch" mode.

  • C-h i g (ert) RET – phils Nov 10 at 20:51
1

When you ran emacs ~/robe/core-tests.el, that opened up the file in your Emacs, right?

Then the tests themselves have to be loaded into Emacs. The ert tests are written in ELisp, so you need to evaluate that file. That can be done with M-x eval-buffer, or if the file is not open, you can run M-x load-file.

Then M-x ert will run those tests. Simply opening the file is not enough.

  • wow what a gotcha – american-ninja-warrior Nov 11 at 21:21
  • Please mark the answer as correct if it solved your problem. – Beetle B. Nov 11 at 23:53

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.