Minitest and TDD

My main project, a Rails app called BLLTN, is developing nicely and nearing completion of all the main features. Check out the latest deploy on Heroku and the code for the tests on GitHub.

Now that I now have a bunch of Rails apps under my belt, it’s definitely much easier to integrate tests into my work flow. While they used to be a a struggle to do after the fact, now I am writing the tests during the process.

The biggest hurdle was knowing the proper syntax and supplying the necessary params when needed. The biggest benefit at this stage in my studies is testing the controller functions and saving myself from a lot of clicking and reloading in the browser.

At this point I am progressing to writing tests first and then following up with the code to make the tests pass. The tests have also saved me a lot of trouble as I work on refactoring the Ruby, adding a bit of JavaScript, and cleaning up the views with partials. Sometimes I break the app in the process and running the test suite periodically has saved me a lot of headache!

Advertisements