views:

272

answers:

1

Are the same unit testing frameworks used for different web frameworks - Rails, Merb, Sinatra, Ramaze and desktop frameworks - Shoes?

And what is the most widely used unit testing framework that would work with all of the various web and desktop frameworks?

+5  A: 

TestUnit is based on JUnit, and so there is port to most languages. This is probably the most ubiquitous.

Behavior driven testing has yielded tools like RSpec, and it seems like right now that may be the most popular test framework in the ruby/rails world. (Here's a site that attempts to keep tabs on popularity: http://ruby-toolbox.com/categories/testing_frameworks.html)

Syntactically you will need to make a choice between those two big camps. Within them, there are lots of implementations, each with their own history, pluses and minuses. Even within the TestUnit world, you can grab "shoulda" and have much of what RSpec gives you. Confusing, eh?

Most of the tools are not explicitly tied to a framework and work fairly independently of Rails.

ndp