Midje
Midje copied to clipboard
background prerequisites should obey :times
Right now, a background prerequisite always is implicitly tagged with :times (range 0)
. If a user explicitly specifies a :times
, that should be obeyed.
I'm disliking this idea now. For a provided
prerequisite, it's clear where the how-many-times-called check happens. When does the check for a wrapping background check happen? At exit from the fact? I think the complexity is unwarranted for a feature not-that-often used.
I'm consolidating all these "background" features into one report that will serve as a reference for the rewrite.
Reopening because I think it is worth looking into addressing.
I've seen some tests that use :times
with against-background
, which basically doesn't do anything, so it would be good to get this sorted to prevent confusion and make sure tests are checking what they expect to check
If going for a fix of this behavior, worth looking at https://github.com/marick/Midje/issues/54 as well