i need it for robolectric
# spek
h
i need it for robolectric
r
can you describe your use-case?
h
In robolectric we use a custom class loader to load the test.
before starting and after finishing the test we setup and teardown things such as application, activity as well as synchronizing threads.
r
Sounds reasonable, can you file a ticket?
InstanceFactory
can also optionally implement
LifecycleListener
, spek will check that and register it automatically.
h
my understanding is that spek unlike junit doesn't create a new instance of class for each test
sure
r
It does, unless it’s an
object
.
h
got it. creating a ticket.
r
Thanks! I’m not sure when an object instance is created by kotlin (we just use
KClass::objectInstance
).