[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup 4128f3e 147/340: Document ERT support in writing
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup 4128f3e 147/340: Document ERT support in writing-tests.md |
Date: |
Thu, 16 Dec 2021 14:59:22 -0500 (EST) |
branch: elpa/buttercup
commit 4128f3e51dab299068cb10be1cf31ad689ac9bec
Author: Ryan C. Thompson <rct@thompsonclan.org>
Commit: Jorgen Schäfer <Jorgen.Schaefer@gmail.com>
Document ERT support in writing-tests.md
---
docs/writing-tests.md | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/docs/writing-tests.md b/docs/writing-tests.md
index da1041d..b980a18 100644
--- a/docs/writing-tests.md
+++ b/docs/writing-tests.md
@@ -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
- [nongnu] elpa/buttercup 677d6d3 118/340: Merge pull request #70 from xendk/color-output, (continued)
- [nongnu] elpa/buttercup 677d6d3 118/340: Merge pull request #70 from xendk/color-output, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup d8dc80d 126/340: Bump version: 1.6 → 1.7, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup b6deeff 128/340: Set Emacs 24.3 as minimum and clean outdated code (close #89), ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 39c7d8c 132/340: Allow ERT "should" and similar to work with buttercup, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup e8140aa 133/340: Implement configurable stack traces, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup e6f97d0 136/340: Release 1.8, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup e26ea54 137/340: Let spy-on :and-return-value work with lists and symbols (close #104), ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup e55e3d8 138/340: travis: Test on 25.1 and 25.2, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup c032c8f 141/340: Exec code blocks in markdown labeled as "emacs-lisp" and "elisp", ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup b97714d 144/340: Declare all variables before first use, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 4128f3e 147/340: Document ERT support in writing-tests.md,
ELPA Syncer <=
- [nongnu] elpa/buttercup 47dd72c 156/340: Set file local variables for consistent code style, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 5458dcc 158/340: Replace buttercup-*-parents with buttercup-suite-or-spec-parents, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 77367d3 165/340: Change shebang to use /usr/bin/env, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup bbbf692 166/340: Fix more compile warnings., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup bcaa7f0 163/340: Use buttercup--specs where possible, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 61ebe91 171/340: Update README.md, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 39d625c 173/340: Bump version: 1.11 → 1.12, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 6330610 176/340: Add more markdown running functions, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 3d3aff9 178/340: Set file local code-style variables in test-buttercup.el, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 553529f 181/340: Remove obsolete buttercup-xdescribe, ELPA Syncer, 2021/12/16