Introduction
  • Welcome to RSpec
  • About Me
  • Unit Tests vs End-to-End (E2E) Tests
  • Setup rbenv / Ruby on MacOS
  • Installing RSpec
  • Installing Visual Studio Code for MacOS
  • Starting a Project with rspec --init
  • Download Course Files (Optional)
  • Test-Driven Development
  • The describe Method
  • The it Method
  • The expect and eq Methods
  • The describe, it and expect Methods
  • Reading Failures
  • Making the Specs Pass
  • QUIZ: TDD and RSpec Methods
  • Multiple Examples in Example Group
  • Fixing Failing Specs Again
  • Making Specs Pass
  • Reducing Duplication - Before Hooks and Instance Variables
  • Reducing Duplication: Helper Methods
  • Problems With Mutation
  • Reducing Duplication: The let Method
  • Custom Error Messages
  • QUIZ: Removing Duplication
  • The context Method and Nested Describes
  • before and after Hooks
  • Nested Logic: Hooks
  • Single Context Hooks
  • Multi-Context Hooks
  • Nested Logic: Overwriting Let Variables
Subjects, Shared Examples, and Shared Context
  • Implicit Subject
  • Implicit Subject
  • Explicit Subject
  • Explicit Subject
  • described_class
  • One-Liner-Example-Syntax
  • Shared Examples with include_examples
  • Shared Context with include_context
  • Subjects, Shared Examples, and Shared Context
Built-In Matchers
  • The not_to Method
  • Equality Matchers I (eq and eql)
  • Equality Matchers II (equal and be)
  • Comparison Matchers
  • Equality and Comparison Matchers
  • Predicate Matchers
  • all Matcher
  • be Matcher (Truthy, Falsy and Nil Values)
  • Predicate, all and be Matchers
  • change Matcher
  • contain_exactly Matcher
  • start_with and end_with Matchers
  • have_attributes Matcher
  • include Matcher
  • raise_error Matcher
  • respond_to Matcher
  • satisfy Matcher
  • not_to Method
  • Compound Expectations
  • Compound Expectations
Mocks
  • Create a Test Double
  • Doubles
  • Set up Our Test Movie
  • Replacing an Object with a Double
  • Receive Counts
  • The allow Method
  • Matching Arguments
  • Instance Doubles
  • Class Doubles
  • Spies I
  • Spies II
Conclusion
  • Conclusion
  • Bonus!