NeilMonday
NeilMonday

Reputation: 2730

ActionController::TestCase vs ActiveSupport::TestCase; What exactly is the difference?

I assume that ActionController::TestCase is for only testing ActionControllers, but what does ActiveSupport::TestCase test? Does it test everything (models, views, and controllers)? Is one or both of these classes old/outdated? I think I prefer to stick with the stock RoR way of testing rather than getting more confused with other gems etc. I'm new to Ruby on Rails and TDD.

Upvotes: 8

Views: 2235

Answers (1)

beornborn
beornborn

Reputation: 212

ActionController::TestCase is designed for testing controllers, so it has special methods for testing controllers.
ActiveSupport::TestCase is designed for testing models.
there is api for these classes
http://api.rubyonrails.org/classes/ActionController/TestCase.html http://api.rubyonrails.org/classes/ActiveSupport/TestCase.html

Upvotes: 7

Related Questions