rubyguides

Tutorial series

Ruby Testing

5 tutorials — follow in order for the best learning path.

  1. Minitest Basics — Your First Ruby Tests

    Get started with Minitest basics: learn assertions, expectations, test fixtures, and best practices for writing fast, reliable Ruby unit tests.

  2. 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.

  3. 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.

  4. 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.

  5. 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.