From the course: Ruby: Testing with RSpec
Unlock the full course today
Join today to access over 22,400 courses taught by industry experts or purchase this course individually.
Other useful matchers - Ruby Tutorial
From the course: Ruby: Testing with RSpec
Other useful matchers
- In this movie, we'll look at five different types of Matchers. These Matchers are in no way less important than the Matchers that we've already looked at so far, but they're grouped together here because they aren't part of another category, and it doesn't really require a whole movie for us to talk about how some of these Matchers work so, instead, this movie is a potpourri of Matchers that are important to know. The Matchers that we'll be looking at are the Regular Expression matcher, the Object Type Matchers, Respond To Matcher, Attribute Matcher, and Satisfy Matcher. The first of these, the Regular Expression Matcher, allows you to match a string using a regular expression, so we can expect the string 'Lynda' to match a regular expression that we provide. Now this is extremely powerful and very flexible, but it does depend on you writing good regular expressions, and that can be tricky, so make sure you have a good grasp of regular expressions and you test them carefully so that…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.