I seem to be going crazy because I swear that the following was
legal...

[SetUp]
public void BeforeEachTest()
{
            m_EngineMock = MockRepository.GenerateMock<Engine>();

            m_EngineMock.Stub(stub => stub.Execute(null, null)
                       .IgnoreArguments()
                       .Return(new Result());
}

// Tests that need the stub to exist...

[Test]
public void TestThatVerfiesTheEngineIsBeingExecuted()
{
    m_EngineMock.Expect(mock = mock.Execute(var1, var2)
            .Repeat.AtLeastOnce()
            .Return(new Result());

    m_SUT.Execute();

    m_EngineMock.VerifyAllExpectations();
}

When I try to do something similar to this my expectation never
passes.  The stub is blocking it but I could have sworn I'd done this
before...
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Rhino.Mocks" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/RhinoMocks?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to