System Tests and Others
In addition to ActiveSupport::TestCase, Rails provides some other subclasses of Minitest::TestCase that provide custom functionality. In most of these cases, the RSpec functionality you’ve already seen is built on top of these classes:
-
ActionDispatch::SystemTestCase is the parent class for system tests, which you saw in Chapter 8, Integration Testing with Capybara and Cucumber.
-
ActionDispatch::IntegrationTest is wrapped by RSpec request specs, as seen in Chapter 11, Testing Rails Display Elements.
-
ActionView::TestCase, ActionMailer::TestCase, and ActiveJob::TestCase all provide specific support similar to the RSpec support discussed in Chapter 11, Testing Rails Display Elements.
Let’s look at the system and integration ...
Get Rails 5 Test Prescriptions now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.