Skip to content

Commit

Permalink
Merge pull request #1413 from Fabricationatorishnicatorist/report_ns_…
Browse files Browse the repository at this point in the history
…in_minibuffer

[#1406] When running tests, report test ns in minibuffer messages
  • Loading branch information
bbatsov committed Nov 12, 2015
2 parents 9130031 + 9eaf350 commit 245096f
Show file tree
Hide file tree
Showing 3 changed files with 7 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 in %s. %d failures, %d 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 in %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
1 change: 1 addition & 0 deletions cider-util.el
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,7 @@ Any other value is just returned."
"The true delight is in the finding out rather than in the knowing. -Isaac Asimov"
"If paredit is not for you, then you need to become the sort of person that paredit is for. -Phil Hagelberg"
"Express Yourself. -Madonna"
"Put On Your Red Shoes and Dance. -David Bowie"
"Take this REPL, fellow hacker, and may it serve you well."
"Let the hacking commence!"
"Hacks and glory await!"
Expand Down

0 comments on commit 245096f

Please sign in to comment.