branch: elpa/buttercup commit 1fd0d8b7fd7aa00d487b12b56410b2b4c72680aa Author: Ola Nilsson <ola.nils...@gmail.com> Commit: Ola Nilsson <ola.nils...@gmail.com>
Set state pending for skipped specs for correct initial count By setting the status field to pending, the initial count printed by the reporter will be correct. --- buttercup.el | 3 ++- tests/test-buttercup.el | 7 ++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/buttercup.el b/buttercup.el index 092deef..6832e4a 100644 --- a/buttercup.el +++ b/buttercup.el @@ -1380,7 +1380,8 @@ SUITES is a list of suites. PATTERNS is a list of regexps." (when (string-match p spec-full-name) (cl-return t))) (setf (buttercup-spec-function spec) - (lambda () (signal 'buttercup-pending "SKIPPED"))))))) + (lambda () (signal 'buttercup-pending "SKIPPED")) + (buttercup-spec-status spec) 'pending))))) ;;;###autoload (defun buttercup-run-markdown-buffer (&rest markdown-buffers) diff --git a/tests/test-buttercup.el b/tests/test-buttercup.el index 8d88aa8..58a9123 100644 --- a/tests/test-buttercup.el +++ b/tests/test-buttercup.el @@ -267,7 +267,12 @@ (it "should return the number of pending specs in a list of suites" (with-local-buttercup (expect (buttercup-suites-total-specs-pending suites) - :to-equal 2)))) + :to-equal 2))) + (it "should also count skipped specs" + (with-local-buttercup + (buttercup--mark-skipped suites (list "skipped")) + (expect (buttercup-suites-total-specs-pending suites) + :to-equal 3)))) (describe "The `buttercup-suites-total-specs-failed' function" (it "should return the number of failed specs in a list of suites"