Have you ever tried writing a test for a function that takes a block and does something to that block? I recently had to do that same thing and found there was not much written about it so in this post I'm going to fix that.

A couple of weeks ago, I was asked to help out with an established Rails app. I found a User model that included 28 modules. A core object in your system, used everywhere, and it’s thousands of lines long. How many features have been bolted onto this model? When you look at a method, which feature does it belong to?