Retroactively Setting Up a Gem/Engine to Use Rspec
Some of us NIRDs built a gem recently, ng_will_paginate, to allow easy use of the fabulous will-paginate gem with an Angular-fronted Rails application. This was the first time we built a gem that uses assets, and it was an excellent learning opportunity. As mentioned in Patrick’s post, we traveled a winding path while building this gem. Namely, we extracted the code for it from another project, which meant that we were pulling in fully formed code, and not practicing TDD (please don’t judge us). As a result, we built the gem without the proper testing options and we needed to add them retroactively. This was a complicated thing to research and figure out, but implementation ended up not being too difficult.
Read on →