machine/machine.specifications — Issue #79: It executed twice
Author: ivanz
Created: 2011-11-23 16:34:34+00:00
State: open

I am currently observing a case where my "It" lambdas in a test scenario are executed twice per test (instead of once) such as: Establish -> It x -> It x -> Cleanup instead of Establish -> It x -> Cleanup.

My test scenario class hierarchy looks like:

public abstract class With_Database
{
Establish before_all = () => {
// integration setup (create database, etc)
};

Cleanup after_all = () => {
};
}

public abstract class With_XXXController : With_Database
{
Establish context = () => {
// Sets up my ASP.NET controller context
};
}

public class When_XXX_attached : With_XXXController
{

It xxxx = () => {
// HERE - lambda executed twice.
};

}