Red-Green-Refactor: Mastering TDD with Ruby & RSpec
Focus on the core TDD workflow: "Red-Green-Refactor." Develop skills by writing failing tests (Red), crafting code to pass them (Green), and refactoring while keeping tests passing (Refactor). This course emphasizes practice over new theory, allowing you to hone your TDD abilities with various coding challenges.
Lessons and practices
Applying a Percentage-Based Discount
Zero Discount Handling Task
Calculating Accurate Decimal Discounts
Negative Price Error Handling in Discount Calculation
Discount Function Error Handling and Calculation Task
Negative Discount Handling
Non-Numeric Price Input Handling in Discount Calculation
Handling Non-Numeric Discount Inputs in Ruby
Handling Very Small Prices in Discount Calculation
Minimum Discount Percentage Application Task
Capping Maximum Discount Amount in Pricing Function
Starting with an Empty Shopping Cart in Ruby
Adding Items to a Shopping Cart
Adding Multiple Items to Shopping Cart in Ruby
Handling Multiple Quantities in Shopping Cart
Removing an Item from ShoppingCart Task
Removing a Non-Existent Item in a Cart Task
Applying Percentage Discount in Shopping Cart
Applying Bulk Discount to Shopping Cart
Clear All Items in Shopping Cart Task
Updating Item Quantity in ShoppingCart
Quantity Limit for Single Item in Shopping Cart
Retrieving Item Details by ID
Applying Discount Codes in a Shopping Cart
Implementing Invalid Discount Code Error Handling in ShoppingCart
Adding an Existing Item to the Shopping Cart
Adding to an Existing Item in ShoppingCart with Quantity Limit Enforcement
Interested in this course? Learn and practice with Cosmo!
Practice is how you turn knowledge into actual skills.