Back-end Engineering
3 learners
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.
RSpec
Ruby
5 lessons
25 practices
3 hours
Programming, Algorithms, and Data Structures
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
Meet Cosmo:
The smartest AI guide in the universe
Our built-in AI guide and tutor, Cosmo, prompts you with challenges that are built just for you and unblocks you when you get stuck.

Join the 1M+ learners on CodeSignal
Be a part of our community of 1M+ users who develop and demonstrate their skills on CodeSignal