[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/buttercup a535e51 134/340: Fix a logic error in spy tests
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/buttercup a535e51 134/340: Fix a logic error in spy tests |
Date: |
Thu, 16 Dec 2021 14:59:19 -0500 (EST) |
branch: elpa/buttercup
commit a535e5196f7ea8204476d8336f37f4e18be62dec
Author: Ryan C. Thompson <rct@thompsonclan.org>
Commit: Jorgen Schäfer <Jorgen.Schaefer@gmail.com>
Fix a logic error in spy tests
If "before-each" is used, then some tests, like "restores the old
value after a spec run", become meaningless, since the before-each
form is always going to restore the value anyway. This commit uses
"before-all" instead.
---
tests/test-buttercup.el | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/tests/test-buttercup.el b/tests/test-buttercup.el
index e488b61..629f043 100644
--- a/tests/test-buttercup.el
+++ b/tests/test-buttercup.el
@@ -505,7 +505,10 @@
(describe "The Spy "
(let (test-function)
- (before-each
+ ;; We use `before-all' here because some tests need to access the
+ ;; same function as previous tests in order to work, so overriding
+ ;; the function before each test would invalidate those tests.
+ (before-all
(fset 'test-function (lambda (a b)
(+ a b))))
- [nongnu] elpa/buttercup 315a891 326/340: Fix stack frame collection in buttercup--backtrace, (continued)
- [nongnu] elpa/buttercup 315a891 326/340: Fix stack frame collection in buttercup--backtrace, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup cccdedf 334/340: Merge pull request #197 from snogge/omit-traceback, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup bef49f5 323/340: Remove extra newline in error backtrace, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 6ef715f 328/340: Use buttercup--mark-stackframe to mark the start of test code, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 2f24a44 338/340: Make formatting of backtrace frames closer to that standard for Emacs, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup f6f9335 337/340: test: Add tests for buttercup-run-discovery, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 553ff83 103/340: Add :to-have-same-items-as to compare lists as sets., ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 657acef 102/340: Bump version: 1.4 → 1.5, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 7e8898b 127/340: Implement :to-have-been-called-times matcher (close #90), ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup ca09040 130/340: Improve the Makefile, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup a535e51 134/340: Fix a logic error in spy tests,
ELPA Syncer <=
- [nongnu] elpa/buttercup 6ad9565 135/340: Fix several edge cases in "spy-on", ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 389dc43 139/340: Fix a problem with reporter tests suppressing failure messages, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 929a904 143/340: Implement closure-based expect macro, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 11d7fdc 148/340: Add "--help" option to buttercup command-line script, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 4106adc 170/340: Add release script, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 9b6cc79 177/340: travis: Test on 26.1, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 0d742b0 187/340: Set failure-description for pending specs, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 1c50a80 196/340: Fix the buttercup-run tests, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 810fa6f 197/340: Bump version: 1.15 → 1.16, ELPA Syncer, 2021/12/16
- [nongnu] elpa/buttercup 4459f37 199/340: Add test for :var* argument, ELPA Syncer, 2021/12/16