RubyFlow : The Ruby Community Blog

Home   Submit   Sign Up   Log In   leaders   Twitter   RSS Feed  
 

A proposal for better mocks

After reading "Growing Object-Oriented Software Guided by Tests" (GOOS), I finally stopped worrying and learned to love the "mockist" or "London School" of TDD. However, the unfortunate fact of this style in Ruby is that tests using mocks can easily find themselves out of sync with the concrete implementations instructed into existence by those mocks, especially when making adjustments to the design of the system.

To that end, I imagined an approach which could resolve the issue with minimal effort. This is a hypothetical syntax, and I haven't started actually implementing it. I thought I'd throw it out to the community for discussion and maybe get the ball rolling on something like it (or something better). See the Gist.

Comments

Post a Comment

Comment abilities for non registered users are currently deactivated, pending time to add a proper CAPTCHA to solve the escalating spam problem. Sorry!