Hello. I was wondering how I could use Spring's @D...
# kotest
s
Hello. I was wondering how I could use Spring's @DirtiesContext annotation inside a StringSpec? Thanks for your help.
e
You can use it on the Spec-class, but not on the tests
s
it doesn't seem to have an effect when i set it on the class
to be precise i have set
Copy code
@DirtiesContext(classMode = DirtiesContext.ClassMode.AFTER_EACH_TEST_METHOD)
is there an issue with StringSpec not using
fun
for declaring tests by any chance?
e
Hmm. I believe Kotest's Spring integration calls the "after test" lifecycle method in Spring after each test.. I'm not sure how DirtiesContext interacts with that.