Does anyone here build test suites for their Middleman sites?
Over the last few weeks I’ve been building an interactive art catalogue in MM (I’ve written a bit about my process here). This project includes some fairly complex features on both the front-end (client-side search and filters, maps and deep-zoom images, etc.) as well as on the back-end (I just wrote a simple extension for generating a PDF version of the book on build).
As the site becomes more complex I am beginning to feel that the lack of a test suite (even an incomplete one) for all of these features is a problem.
I am fairly new at Ruby and programming generally, and most of what I know about testing is in the context of Rails. I would love to write a few unit tests for the logic in my extensions/helper methods, as well as a couple of integration tests to tie the whole thing together, but I don’t really know where to begin.
Are there any “best practices” for where to put tests, how to run them, or how to integrate them with the Middleman processes generally? Is there an easy way to drop in Minitest or Rspec and set up a bundle exec test
command?
Would love to hear if anyone here has solved this problem in their own work.