Get started with Minitest basics: learn assertions, expectations, test fixtures, and best practices for writing fast, reliable Ruby unit tests.
Tutorial series
Ruby Testing
5 tutorials — follow in order for the best learning path.
- Minitest Basics — Your First Ruby Tests
- Mocking and Stubbing in Ruby with Minitest: Mocks, Stubs, and Spies
Master Minitest mocking and stubbing: learn mock objects, method stubs, spies, and practical patterns for testing Ruby code without external dependencies.
- Integration Testing in Ruby: RSpec and Capybara Guide
Learn integration testing in Ruby with RSpec and Capybara: test database interactions, HTTP requests, JSON APIs, and email delivery with practical examples.
- Ruby Test Coverage with SimpleCov: Measure and Improve Your Tests
Learn how Ruby test coverage with SimpleCov helps find untested code, track line and branch coverage, integrate with CI, and write meaningful tests.
- CI Setup with GitHub Actions for Ruby
Learn how to set up CI setup for Ruby projects with GitHub Actions, including tests, linting, database checks, and practical workflow examples.