The call to Invoices.removeAll
seems to be missing a parameter, you may need to add ().
TickSpec expects attributed methods to return unit, so you may need to pipe the result to ignore. You can check the type of the Drop Invoices
function by hovering over it, it should say unit -> unit, if it doesn't try this:
let [<AfterScenario>] ``Drop Invoices`` () =
Invoices.removeAll () |> ignore
There was an issue prior to the November 2012 release of TickSpec where AfterStep and AfterScenario functions were not called if an exception was thrown when executing a step in a scenario. This is fixed in the latest source and the assembly is available via CodePlex or Nuget.
If you have more than one function marked as AfterScenario and any of them raise an exception then subsequent AfterScenario methods will not be called. Ideally your BeforeSceanrio and AfterScenario functions should not throw.