Tag

Your search for tap returned 1 result.


DRY up Rspec with tap!

I'm a big fan of keeping Rspec DRY. Mostly, because it hurts my heart to have to write the same thing twice. It huuuurts. Here's a great article on code reuse in Rspec. A scenario I struggle with DRYing up: I'd like to either stub! or call should_receive on a method and sometimes return a value. Previously, I would still have to write the stub! or should_receive ...

Read More