Video description
This course offers a comprehensive overview of the RSpec testing library for the Ruby programming library. RSpec is the most popular Ruby Gem of all time, with over 300 million downloads to date. If you are new to the topic, testing is the practice of writing code that confirms that other code works as expected. Tests control regressions, which are changes to the code that breaks the program.
The benefits of testing extend beyond the codebase. Adopting a test-driven approach will also make you a better developer. Tests force you to think critically about a program and its features: classes, objects, methods, and more.
This course begins with the essentials and proceeds to more complex topics, including installation, project initialization, Test-Driven Development (TDD), let variables, before and after hooks, subjects, shared examples, shared context, built-in matches, mocks and doubles, instance doubles, and class doubles.
At the completion of this course, you will have acquired hands-on Ruby testing experience with this awesome RSpec library.
What You Will Learn
- Learn how to install RSpec and initialize the project
- Cover Test-Driven Development (TDD), methods, and hooks
- Learn about subjects, shared examples, and shared context
- Explore built-in matchers such as not_to, all, eq, and more
- Learn to create a test double
- Understand instance doubles and class doubles
Audience
Programmers who want to explore the fundamentals of testing and TDD and intermediate Ruby developers interested in upgrading their skillset will benefit from this course. Knowing any text editor (VS Code is recommended) would be beneficial. No previous testing experience is needed!
About The Author
Boris Paskhaver: Boris Paskhaver is a NYC-based web developer and software engineer with experience in building apps in React/Redux and Ruby on Rails. Raised in New Jersey, he graduated from the Stern School of Business at New York University in 2013 with a double major in business economics and marketing. Since graduation, his work has taken him in a wide variety of directions—he spent years in marketing, then financial services, and now the tech industry.
He has worked everywhere, from a 50-person digital agency to an international tech powerhouse with thousands of employees. He always had a love of learning but struggled with the traditional resources available for education. His goal is to create comprehensive courses that break down complex details into small, digestible pieces.
Publisher resources
Table of contents
-
Chapter 1 : Introduction
- Welcome to RSpec
- Unit Tests versus End-to-End (E2E) Tests
- Installing RSpec
- Starting a Project with rspec --init
- Test-Driven Development
- The Describe Method
- The it Method
- The Expect and Eq Methods
- Reading Failures
- Making the Specs Pass
- Multiple Examples in Example Group
- Fixing Failing Specs Again
- Reducing Duplication - Before Hooks and Instance Variables
- Reducing Duplication: Helper Methods
- Problems with Mutation
- Reducing Duplication: The let Method
- Custom Error Messages
- The context Method and Nested Describes
- Before and After Hooks
- Nested Logic: Hooks
- Nested Logic: Overwriting Let Variables
- Chapter 2 : Subjects, Shared Examples, and Shared Context
-
Chapter 3 : Built-In Matchers
- The not_to Method
- Equality Matchers I (eq and eql)
- Equality Matchers II (equal and be)
- Comparison Matchers
- Predicate Matchers
- all Matcher
- be Matcher (Truthy, Falsy and Nil Values)
- 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
- Chapter 4 : Mocks
- Chapter 5 : Conclusion
Product information
- Title: Testing Ruby with RSpec: The Complete Guide
- Author(s):
- Release date: August 2019
- Publisher(s): Packt Publishing
- ISBN: 9781839219474
You might also like
video
Build a CI/CD Pipeline
Approximately 8 Hours of Video Instruction If your development team is still dealing with manual and …
video
Full Stack Web Development Mastery Course - Novice to Expert
Full stack development refers to the development of both frontend (client-side) and backend (server-side) portions of …
video
SSL Complete Guide 2021: HTTP to HTTPS
This course is all about securing websites with SSL/TLS certificates. We start by exploring the basics …
video
Java SE 17 Developer (1Z0-829)
21+ Hours of Video Instruction An intensive and guided video course to learn and practice while …