[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup 8b3cfad 214/340: Update test for new warning cap
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup 8b3cfad 214/340: Update test for new warning capture suppression behavior |
Date: |
Thu, 16 Dec 2021 14:59:37 -0500 (EST) |
branch: elpa/buttercup
commit 8b3cfad70f3fff17bf6533fe236c2accc4054dee
Author: Ryan C. Thompson <rct@thompsonclan.org>
Commit: Ryan C. Thompson <rct@thompsonclan.org>
Update test for new warning capture suppression behavior
---
docs/writing-tests.md | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/docs/writing-tests.md b/docs/writing-tests.md
index 7be3782..cb72b28 100644
--- a/docs/writing-tests.md
+++ b/docs/writing-tests.md
@@ -640,7 +640,8 @@ By default, Buttercup captures any warning emitted during a
test and
displays them all after the test completes in order to keep the output
readable. If you need to suppress this (for example if your test deals
with the warnings itself), you can use the macro
-`buttercup-suppress-warning-capture`.
+`buttercup-suppress-warning-capture`, which works like `progn` but
+suppresses Buttercup's warning capturing within the body.
```Emacs-Lisp
(describe "A test"
@@ -650,8 +651,11 @@ with the warnings itself), you can use the macro
(it "can capture its own warnings as part of the test"
(buttercup-suppress-warning-capture
- (display-warning 'buttercup "This warning should be captured in
`collected-output'.")
- (expect (with-current-buffer "*Warnings*"
- (buffer-string))
- :to-match "This warning should be captured"))))
+ (let ((warning-text
+ (format "This warning, issued at %s should be sent to the
*Warnings* buffer as normal."
+ (current-time-string))))
+ (display-warning 'buttercup warning-text)
+ (expect (with-current-buffer "*Warnings*"
+ (buffer-string))
+ :to-match (regexp-quote warning-text))))))
```
- [nongnu] elpa/buttercup acccc0f 179/340: Modify xdescribe to keep all contained specs as pending, (continued)
- [nongnu] elpa/buttercup acccc0f 179/340: Modify xdescribe to keep all contained specs as pending, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup d07dbf3 182/340: Merge pull request #129 from snogge/fix-obsolete-aliases, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 079ef3e 186/340: Bump version: 1.12 → 1.13, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 1998ae3 188/340: Drop unused variable in buttercup--disable-specs, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup edcffde 189/340: Add start and end times to each suite or spec, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 075b318 198/340: Add support for :var*, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 1c762a5 200/340: Add documentation for :var and :var*, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 159fe3c 203/340: Really fix the buttercup-run tests, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup d2b6692 206/340: Bump version: 1.16 → 1.17, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup e62ce43 207/340: test: Do not leak functions from "The Spy " test suite, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 8b3cfad 214/340: Update test for new warning capture suppression behavior,
ELPA Syncer <=
- [nongnu] elpa/buttercup 1567c03 215/340: Add emacs-26.3 to CI config, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 6cf8041 229/340: Update writing-tests.md to describe new spy context structs, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup c720cef 233/340: Merge pull request #146 from DarwinAwardWinner/spy-record-errors, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup b2edd35 235/340: Change: (buttercup-define-matcher-for-binary-function) Add newlines, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 818c150 239/340: docs: Clarify the difference between :var and `let', ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup d8ab09d 244/340: Update documentation for the --pattern option in running-tests.md, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup adba24e 246/340: Bump version: 1.19 → 1.20, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup e7e5d22 248/340: Add an option to immediately abort Buttercup run if a test fails, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup dcc2638 249/340: Revert "Add an option to immediately abort Buttercup run if a test fails", ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 9b30c75 252/340: Make buttercup-x?it and buttercup-suite-add-child return spec, ELPA Syncer, 2021/12/16