2

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.

american-ninja-warrior
  • 3,773
  • 2
  • 21
  • 40

1 Answers1

7

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.

zck
  • 8,984
  • 2
  • 31
  • 65