Closed indiejames closed 5 years ago
Hi @indiejames ! Sorry for the late response. I'm not sure that sharing data between tests is a good idea and there is no such functionality in ESpec. But there is the "before_all" callback. It doesn't allow you to set shared value, but you can implement an Agent and store values there.
It would be useful to be able to define a
before
that is scoped to the current level not to all child levels. As an example consider the following test code:When run this will produce the following output:
The
before
gets called for every test. It would be useful to be able to declare abefore
that only gets called once for eachdescribe
, like soWhen run this would produce the following output:
The
scoped_before
would only be called once for each nesteddescribe
.