[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup 683614d 018/340: Tests for the describe macro.
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup 683614d 018/340: Tests for the describe macro. |
Date: |
Thu, 16 Dec 2021 14:58:56 -0500 (EST) |
branch: elpa/buttercup
commit 683614d0276c9d1ea8e9b20e04a30b963bd07a70
Author: Jorgen Schaefer <contact@jorgenschaefer.de>
Commit: Jorgen Schaefer <contact@jorgenschaefer.de>
Tests for the describe macro.
---
buttercup-test.el | 6 ++++++
buttercup.el | 4 ++--
2 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/buttercup-test.el b/buttercup-test.el
index c31d2f6..27c797f 100644
--- a/buttercup-test.el
+++ b/buttercup-test.el
@@ -145,3 +145,9 @@
(expect (buttercup-suite-children suite)
:to-equal
'(23)))))
+
+(describe "The `describe' macro"
+ (it "should expand to a simple call to the describe function"
+ (expect (macroexpand '(describe "description" (+ 1 1)))
+ :to-equal
+ '(buttercup-describe "description" (lambda () (+ 1 1))))))
diff --git a/buttercup.el b/buttercup.el
index c482539..ec852e6 100644
--- a/buttercup.el
+++ b/buttercup.el
@@ -252,9 +252,9 @@ form.")
(defmacro describe (description &rest body)
"Describe a suite of tests."
(declare (indent 1))
- `(buttercup--describe-internal ,description (lambda () ,@body)))
+ `(buttercup-describe ,description (lambda () ,@body)))
-(defun buttercup--describe-internal (description body-function)
+(defun buttercup-describe (description body-function)
"Function to handle a `describe' form."
(let* ((enclosing-suite buttercup--current-suite)
(buttercup--current-suite (make-buttercup-suite
- [nongnu] elpa/buttercup d580e5c 011/340: Add build status badge., (continued)
- [nongnu] elpa/buttercup d580e5c 011/340: Add build status badge., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 3637e3d 015/340: Add more extensive matcher tests to the README., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup a277b0e 022/340: Setup and teardown: before-each, after-each, before-all, after-all, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 1882d6f 013/340: Comment cleanup. Also, make elisp lexically scoped., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup c5a9f26 003/340: Add first set of unit tests., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 36522b9 006/340: Add .travis.yml, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup f44e65d 004/340: Unit tests for define-matcher and apply-matcher., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup d3cd12a 019/340: Tests for the buttercup-describe function, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 3772ad5 014/340: Use eval-region instead of eval-buffer., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 8aa87c8 026/340: Spy :and-call-through, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 683614d 018/340: Tests for the describe macro.,
ELPA Syncer <=
- [nongnu] elpa/buttercup 0221830 023/340: Remove setup and teardown from ROADMAP.md., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 695e444 016/340: buttercup-markdown-runner: Use setq, not setq-local., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 7526198 029/340: Spies: :and-throw-error, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 77d1dac 017/340: Test buttercup-suite-add-child., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup c1abc2a 033/340: Refactoring of spy context accessors., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup f314737 035/340: ROADMAP.md: Remove spies section, as it is done., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 4bd24e7 037/340: ROADMAP cleanup., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 55b87ec 039/340: Removed ROADMAP.md. This is now tracked in issues., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 993ddda 040/340: Add .gitignore, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 1dcd2cd 041/340: Prepare release, add bumpversion and pkg.el, ELPA Syncer, 2021/12/16