Fix `withData` and `withConfiguration` helpers.
Both of them dynamically generate specs which close over the iteration variable of a for loop. Closures capture *references*, not values, and so when the variable is mutated on loop iteration its new value is used when the spec is called. This means that instead of running a spec with n different values, we run the spec n times with the same value. This is bad.
Showing
Please
register
or
sign in
to comment