Skip to content

Commit e1ef0b0

Browse files
committed
fixes #42 by throwing an exception for implicit expect
Signed-off-by: Sean Corfield <[email protected]>
1 parent a56c19c commit e1ef0b0

File tree

4 files changed

+8
-6
lines changed

4 files changed

+8
-6
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@
66

77
Only accretive/fixative changes will be made from now on.
88

9+
* 2.3.next in progress
10+
* Address [#42](https://github.com/clojure-expectations/clojure-test/issues/42) by removing support for the implicit `expect` form of `defexpect`. This was deprecated in 2.2.214. In 2.3.next, an exception is thrown.
11+
* Updated dev/test dependencies.
12+
913
* 2.2.214 -- 2024-12-13
1014
* Address [#41](https://github.com/clojure-expectations/clojure-test/issues/41) by deprecating the implicit `expect` form of `defexpect` and printing an obnoxious warning when it is used. This form of `defexpect` will be removed in a future release!
1115
* PR [#40](https://github.com/clojure-expectations/clojure-test/pull/40) [@NoahTheDuke](https://github.com/NoahTheDuke) reduces the amount of code generated for `?=` (and, in turn, for `more-of`), allowing for more complex tests.

build.clj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
[deps-deploy.deps-deploy :as dd]))
2929

3030
(def lib 'com.github.seancorfield/expectations)
31-
(defn- the-version [patch] (format "2.2.%s" patch))
31+
(defn- the-version [patch] (format "2.3.%s" patch))
3232
(def version (the-version (b/git-count-revs nil)))
3333
(def snapshot (the-version "999-SNAPSHOT"))
3434
(def class-dir "target/classes")

deps.edn

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
:deps {org.clojure/clojure {:mvn/version "1.9.0"}}
44
:aliases
55
{;; for help: clojure -A:deps -T:build help/doc
6-
:build {:deps {io.github.clojure/tools.build {:mvn/version "0.10.5"}
6+
:build {:deps {io.github.clojure/tools.build {:mvn/version "0.10.6"}
77
slipset/deps-deploy {:mvn/version "0.2.2"}}
88
:ns-default build}
99

src/expectations/clojure/test.cljc

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -449,10 +449,8 @@
449449
[n & body]
450450
(if (and (= (count body) 2)
451451
(not (some contains-expect? body)))
452-
;; treat (defexpect my-name pred (expr)) as a special case
453-
`(t/deftest ~n (do
454-
(println "DEPRECATED: implicit 'expect' in defexpect" '~n)
455-
(expect ~@body)))
452+
(throw (ex-info (str "defexpect " n " should contain at least one 'expect' form")
453+
{:name n, :body body}))
456454
;; #13 match deftest behavior starting in 2.0.0
457455
`(t/deftest ~n ~@body)))
458456

0 commit comments

Comments
 (0)