branch: elpa/buttercup commit f3c2b0048f270724ccf87b9b73ced9817439ff0b Author: Ola Nilsson <ola.nils...@gmail.com> Commit: Ola Nilsson <ola.nils...@gmail.com>
test: Move with-local-buttercup to top of file --- tests/test-buttercup.el | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/test-buttercup.el b/tests/test-buttercup.el index 58a9123..2558b0a 100644 --- a/tests/test-buttercup.el +++ b/tests/test-buttercup.el @@ -34,6 +34,20 @@ (lambda () item)) items)) +(defmacro with-local-buttercup (&rest body) + "Execute BODY with local buttercup state variables." + (declare (debug t) (indent defun)) + `(let (buttercup--after-all + buttercup--after-each + buttercup--before-all + buttercup--before-each + (buttercup--cleanup-functions :invalid) + buttercup--current-suite + (buttercup-reporter #'ignore) + buttercup-suites + (buttercup-warning-buffer-name " *ignored buttercup warnings*")) + ,@body)) + ;;;;;;;;;; ;;; expect @@ -346,20 +360,6 @@ (expect (buttercup-elapsed-time spec) :to-equal (seconds-to-time 1.5)))))) -(defmacro with-local-buttercup (&rest body) - "Execute BODY with local buttercup state variables." - (declare (debug t) (indent defun)) - `(let (buttercup--after-all - buttercup--after-each - buttercup--before-all - buttercup--before-each - (buttercup--cleanup-functions :invalid) - buttercup--current-suite - (buttercup-reporter #'ignore) - buttercup-suites - (buttercup-warning-buffer-name " *ignored buttercup warnings*")) - ,@body)) - (describe "The `buttercup--run-suite' function" (before-each (spy-on 'buttercup--set-start-time :and-call-through)