views:

41

answers:

1

I have been an evil coder - working like crazy to get a ROR demo operational and ignoring RSpec. Does anyone have any helpful (aka; friendly) advice on using RSpec to get the current implementation under BDD control? Especially pitfalls to avoid.

Many thanks.

+2  A: 

Did you take into consideration shoulda

Shoulda makes it easy to write elegant, understandable, and maintainable tests. Shoulda consists of test macros, assertions, and helpers added on to the Test::Unit framework. It’s fully compatible with your existing tests, and requires no retooling to use.

more at:
http://github.com/thoughtbot/shoulda

Adnan
+1 for shoulda, gives you some of the sugar that RSpec gives you without having to use RSpec
Omar Qureshi
This is in no way relevant to the question of how to add tests to existing code. RSpec is also fully compatible with Test::Unit, but/and the OP doesn't indicate that they have any tests at all so far.
James Baker