Rhino Mocks - Do we really need stubs?
        Posted  
        
            by 
                Marcelo Oliveira
            
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Marcelo Oliveira
        
        
        
        Published on 2012-09-10T21:07:00Z
        Indexed on 
            2012/09/10
            21:38 UTC
        
        
        Read the original article
        Hit count: 312
        
If it's possible to change mock behaviour in Rhino Mocks using mock.Stub().Return(), why do we need Stubs anyway?
What do we lose by always using MockRepository.GenerateMock()?
One big benefit of using Mocks instead of Stubs is that we will be able to reuse the same instance among all the tests keeping them cleaner and straightforward.
The moq framework works in a similar way... we don't have different objects for mocks and stubs.
(please, don't answer with a link to Fowler's "Mocks aren't stubs" article)
© Stack Overflow or respective owner