I'm not sure I understand how you use mocks. In any case, it's a BDD anti-pattern to hide away in some logic that is executed at every step because you lose the communication aspect.

It'd be much better if you could express that logic in the Given step or incorporate it directly in the implementation of the When step.

If you want to share an example of what you're trying to do, we can discuss it further.

On 13/09/2014 11:35, Chad Wilson wrote:
We've got some complex interactions we're mocking. Part of the Given statements are going to be mock setup. Because we don't know ahead of time which mocks will need to be setup, it would simplify things if we could just iterate over their builders and register them accordingly before the when steps.

Chad

On 9/13/2014 1:34 AM, Mauro Talevi wrote:
No, but why would you want to do that?

Can you explain your usecase?

On 13/09/2014 02:46, Chad Wilson wrote:
Is there any way to run something before all When steps?

Chad

---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

    http://xircles.codehaus.org/manage_email





---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email




---------------------------------------------------------------------
To unsubscribe from this list, please visit:

   http://xircles.codehaus.org/manage_email


Reply via email to