Re: [rspec-users] Mocking base class methods

2009-02-21 Thread Tobi
Zach Dennis wrote: > +1 to composition over inheritance here. Mocking at different layers > of an inheritance hierarchy sounds like trouble and screams to pull > that thing apart. Good point! I've already tried the composition approach. It solves the testabilitiy problems, but it doesn't feel rig

[rspec-users] Mocking base class methods

2009-02-21 Thread Tobi
Hi! I need to write some wrapper classes, that derive from SWIG generated proxy classes for some C/C++ extensions. The Ruby wrapper classes need to do a lot of 'super' calls to the base classes generated by SWIG. The question is: Is there any way to make RSpec mock a base class and record/verify