Isolating Dependencies with Test Doubles in Ruby & RSpec
Explore the critical role of test doubles in modern software testing. This session introduces you to dummies, stubs, spies, mocks, and fakes. Gain expertise in isolating units under test, managing behavior, and constructing fast, reliable, maintainable tests. Step into using test doubles to enhance your development practices.
Lessons and practices
Testing Email Parameters with Dummies
Enhancing DummyLogger with Severity Parameter in EmailService
Fixing Test Suite for EmailService with Test Doubles
Enhancing EmailService Tests with Dummies
Enhancing NewsletterService Tests with Dummies
Using Stubs to Simulate Weather Conditions in Ruby
Using Stubs to Handle Temperature Alerts in Ruby
Handling Storm Warnings in WeatherAlertService Using Stubs
Handling Normal Weather Conditions in Weather Alert System Using Stubs
Refactor Weather Alert Service Using RSpec Doubles
Verify Notification Send Method with RSpec Spies
Verify Notification Delivery with RSpec Spies
Testing Notification Priority with RSpec Spies
Verify Notification Functionality with RSpec Spies
Testing Pricing Service with Mocked Exchange Rate Values
Isolating Exchange Rate Calls in Pricing Service Test
Testing Pricing Service with Negative Amount Exceptions
Testing Pricing Service with Custom Exchange Rate Mocks
Testing Pricing Service with Bulk Price Calculations
Implementing User Creation with Fake Repository Using Test-Driven Development
Implementing Duplicate Email Validation during User Registration in TDD
Implementing User Name Update with Test-Driven Development in Ruby
Implementing Exception Handling for Non-Existent User Name Updates in TDD
Implementing Deactivate User Method in TDD with Ruby
Implementing Exception Handling for User Deactivation in TDD
Interested in this course? Learn and practice with Cosmo!
Practice is how you turn knowledge into actual skills.