Shoulda test macro for acts_as_state_machine
In this post I will talk about shoulda macro for state_machine to facilitate TDD. So lets get familiar with these at first (want to skip the intro! ok, just jump to code ;) Acts_as_state_machine : A really powerful plugin to incorporate state machine in rails application. In scrumpad we are using this plugin and it made the implementation such a fun that everyone here just love to take this work 8). You can take a look to see how this plugin makes everything for you in a blink of eye. Shoulda : "The Shoulda gem makes it easy to write elegant, understandable, and maintainable Ruby tests"- Thoughtbot Community . Yes, shoulda really makes your test codes speak. You will be able to define your every test cases exactly in the way that you would probably state to someone. TDD : Firstly programming without test code, impossible!! And, if your application is written in any dynamic language(e.g: ruby, php) then TDD is the must. In TDD practice at first you...