Mockumentary, the ActiveRecord Stubbing Companion Gem
With the happy proliferation of TDD/BDD test suites are big. Like most Rails developers, I have been working on ways to reduce test speed by tighter unit tests with more mocking and stubbing. After watching Corey Haines speak about faster Rails tests and trying to overhaul a messy, entangled codebase with its equally icky test suite, I started building the gem Mockumentary. It does a really good job of faking ActiveRecord objects, complete with association stubbing and mocked data by column type. Mockumentary introspects Rails to get its field and association data, but it also has a companion set of classes that can be loaded from YAML and work in a Rails/ActiveRecord free environment. This makes switching tests to a super-fast Rails free suite very easy. Checkout the why and how on wiki.
Comments
dating singles sites
Post a comment