Skip to content

Commit

Permalink
Deprecating inspecting. (#4009)
Browse files Browse the repository at this point in the history
A [code search on
github](https://github.com/search?q=import+io.kotest.assertions.inspecting+NOT+is:fork&type=code)
shows no usages aside from Kotest itself, albeit being in Kotest since
2018.

Kotlin provides the `with` scoping function which does basically the
same thing.

Kotest also provides `assertSoftly` on an object which adds it to scope
and executes all assertions before failing.

<!-- 
If this PR updates documentation, please update all relevant versions of
the docs, see:
https://github.com/kotest/kotest/tree/master/documentation/versioned_docs
The documentation at
https://github.com/kotest/kotest/tree/master/documentation/docs is the
documentation for the next minor or major version _TO BE RELEASED_
-->

Co-authored-by: Sam <sam@sksamuel.com>
  • Loading branch information
Kantis and sksamuel committed May 19, 2024
1 parent ac8caf2 commit 7d07732
Showing 1 changed file with 1 addition and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ package io.kotest.assertions
* @param inspector the inspector in which further assertions and inspections can be done
* @author Hannes Thaller
*/
@Deprecated(message = "Use with(obj) or assertSofty(obj) instead. Deprecated in 5.9. Will be removed in 6.0")
fun <K> inspecting(obj: K, inspector: K.() -> Unit) {
obj.inspector()
}

0 comments on commit 7d07732

Please sign in to comment.