Chapter 8. Testing Your Plugin
Rails-based projects are structured to allow software tests to be easily incorporated. Most open source projects such as Redmine include tests, and contributors are requested (if not required) to submit tests with their patches. This is especially true for projects written in dynamic languages such as Ruby.
The Redmine core project has excellent test coverage, and if our plugin relies on the core features of Redmine, writing tests is a good way to quickly detect Redmine code changes.
The assumption while going into this chapter is that we are interested in writing tests that can be run in the same environment as the Redmine core project's test suite. Whether we feel that Test Driven Development is beneficial or detrimental to our project and what constitutes a good test are out of the scope of this book as they are extremely subjective topics.
For a good introduction to Test Driven Development as it relates to Rails applications, visit http://andrzejonsoftware...