Maybe a silly question, but when are `beforeGroup`...
# spek
r
Maybe a silly question, but when are
beforeGroup
and
afterGroup
called? In previously working tests, I’m suddenly getting an error in my
afterGroup
block that seems to indicate it’s being run before my
beforeGroup
has been run
Copy code
beforeGroup {
  presenter.takeView(view) //this opens a dao connection
}

afterGroup {
  presenter.dropView(view) //this closes the dao connection
}

//error generated: kotlin.UninitializedPropertyAccessException: lateinit property dao has not been initialized
r
what's the
CachingMode
for
presenter
? If it's the default (
CachingMode.TEST
), then you should use beforeEachTest /afterEachTest.
r
@raniejade unfortunately that didn’t fix the problem