copypastedeveloper / given

Given is a bdd library made with the intent of wrapping common testing frameworks easily.
10 stars 2 forks source link

Add a new before_then delegate. #8

Closed KarsonAlford closed 9 years ago

KarsonAlford commented 10 years ago

The before delegate is ran once before the other delegates.

In many cases several of the thens in a scenario need to manipulate the result(s) from the when before performing a test. In some cases the same pre-then setup is shared between several of the thens.

A solution to this would be to have another delegate that is batched with the thens that allows setup.

Note: Individually ran tests/then's would need all of these new delegates ran prior to the test/then being executed.

copypastedeveloper commented 10 years ago

not sure what this means. solid example?

KarsonAlford commented 9 years ago

This is an edge case that I was experiencing and no longer think that it should be solved in Given.