Written April 07, 2011 at 09:00 MDT Tagged developwithpassion.specifications
There will be times when you will want to explicilty specify how the SUT should be created when you are inheriting from either of the following classes:
To accomplish this you need to leverage the following block of code in the Establish block for your context:
sut_factory.create_using(factory);
Factory will be of type SUTFactory
Most likely you will be using it as follows:
sut_factory.create_using(() => new Calculator())
Hope this helps out!!