Commit 4128f3e5 authored by Ryan C. Thompson's avatar Ryan C. Thompson Committed by Jorgen Schäfer

Document ERT support in writing-tests.md

parent 5d1f338a
......@@ -162,6 +162,21 @@ that are not included below.
(expect (+ a 1) :to-throw 'void-variable '(a)))))
```
If you are migrating from ERT, you can also use `should` and similar
macros inside a buttercup test just like you would inside an
`ert-deftest` form.
```Emacs-Lisp
(require 'ert)
(describe "ERT support"
(it "allows you to use ERT macros in tests"
(let* ((a 12)
(b a))
(should (= a b))
(should-not (eq a nil))
(should-error (error "Throws an error")))))
```
## Grouping Related Specs with `describe`
The `describe` macro is for grouping related specs. The string
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment