These are chat archives for etorreborre/specs2

26th
Aug 2018
Igal Tabachnik
@hmemcpy
Aug 26 2018 10:42
I was thinking today about the need to instantiate the actual spec to build a SpecificationStructure... does there have to be an actual instance of the class? Why isn't reflection enough?
(context: I'm trying to think of ways getDescription can be prevented from throwing exceptions, if there are class initialization errors)
Eric Torreborre
@etorreborre
Aug 26 2018 16:19
All the spec fragments come from the execution of the def is = … method. You can’t access the structure of a spec without creating an instance of the class and calling a method on it. Also if you are using a mutable spec, all the fragments are being registered at the moment you create the instance through side effects. How would you do all that differently?