Master the syntax and structure of RSpec, the most popular Ruby Gem for testing right from scratch!
About This Video
Master the syntax and structure of RSpec, the most popular Ruby Gem for testing
Explore the wide collection of RSpec matches available to test your code
Utilize test-driven development principles to design and implement clean test specs in Ruby
In Detail
This course offers a comprehensive overview of the RSpec testing …
Testing Ruby with RSpec: The Complete Guide
Video description
Master the syntax and structure of RSpec, the most popular Ruby Gem for testing right from scratch!
About This Video
Master the syntax and structure of RSpec, the most popular Ruby Gem for testing
Explore the wide collection of RSpec matches available to test your code
Utilize test-driven development principles to design and implement clean test specs in Ruby
In Detail
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.
Audiene
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!
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
Implicit Subject
Explicit Subject
described_class
One-Liner-Example-Syntax
Shared Examples with include_examples
Shared Context with include_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
Create a Test Double
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
Chapter 5 : Conclusion
Conclusion
Start your Free Trial Self paced Go to the Course We have partnered with providers to bring you collection of courses, When you buy through links on our site, we may earn an affiliate commission from provider.
This site uses cookies. By continuing to use this website, you agree to their use.I Accept