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

I assume that ActionController::TestCase is only for testing ActionControllers , but what does the ActiveSupport::TestCase test do? Does it check everything (models, views, and controllers)? Is one or both of these classes old / obsolete? I think I prefer to adhere to the RoR testing course, rather than being more embarrassed with other gems, etc. I am new to Ruby on Rails and TDD.

+6
source share
1 answer

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

+6
source

Source: https://habr.com/ru/post/901549/


All Articles