Skip to content

Commit

Permalink
[clojure-emacs#1406] When running tests, report test ns in minibuffer…
Browse files Browse the repository at this point in the history
… messages
  • Loading branch information
Fabricationatorishnicatorist committed Nov 12, 2015
1 parent 9130031 commit 1881209
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

### New features

* [#1406](https://github.com/clojure-emacs/cider/issues/1406): When running tests, report test ns in minibuffer messages.
* [#1402](https://github.com/clojure-emacs/cider/pull/1402): When tests pass after previously failing, update the test-report buffer to show success.
* [#1373](https://github.com/clojure-emacs/cider/issues/1373): Add gradle support for `cider-jack-in`.
* Indentation of macros (and functions) [can be specified](https://github.com/clojure-emacs/cider#specifying-indentation) in the var's metadata, via [indent specs](Indent-Spec.md).
Expand Down
10 changes: 5 additions & 5 deletions cider-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -325,12 +325,12 @@ With the actual value, the outermost '(not ...)' s-expression is removed."

;;; Summary echo

(defun cider-test-echo-summary (summary)
"Echo SUMMARY statistics for a test run."
(defun cider-test-echo-summary (summary ns)
"Echo SUMMARY statistics for a test run of tests in NS."
(nrepl-dbind-response summary (test fail error)
(message
(propertize
(format "Ran %s tests. %s failures, %s errors." test fail error)
(format "Ran %d tests from %s. %s failures, %s errors." test ns fail error)
'face (cond ((not (zerop error)) 'cider-test-error-face)
((not (zerop fail)) 'cider-test-failure-face)
(t 'cider-test-success-face))))))
Expand Down Expand Up @@ -434,7 +434,7 @@ This uses the Leiningen convention of appending '-test' to the namespace name."
Upon test completion, results are echoed and a test report is optionally
displayed. When test failures/errors occur, their sources are highlighted."
(cider-test-clear-highlights)
(message "Testing...")
(message "Running tests from %s..." ns)
(cider-nrepl-send-request
(list "ns" ns "op" (if retest "retest" "test")
"tests" tests "session" (cider-current-session))
Expand All @@ -449,7 +449,7 @@ displayed. When test failures/errors occur, their sources are highlighted."
(setq cider-test-last-test-ns ns)
(setq cider-test-last-results results)
(cider-test-highlight-problems ns results)
(cider-test-echo-summary summary)
(cider-test-echo-summary summary ns)
(if (or (not (zerop (+ error fail)))
cider-test-show-report-on-success)
(cider-test-render-report
Expand Down

0 comments on commit 1881209

Please sign in to comment.