Join Kevin Skoglund for an in-depth discussion in this video Collections, part of RSpec Testing Framework with Ruby.
- In this movie, we'll take a look…at RSpec's Collection Matchers.…Now, what do I mean by a collection?…Really what we're talking about…are arrays, hashes or strings.…Strings are collection of letters.…They work in a lot of ways…very similar to an array, right?…We have different order of letters,…just like we have different order…of elements inside an array.…Those are the three things we're going to be looking at…with Collection Matchers.…Let's start with arrays.…Let's say I have a simple array, [1,2,3].…
I can use the include matcher…to assert that a value should be included in that array…so I can expect the array to include 3…or I can provide more than one value.…The order doesn't matter here.…What I'm actually making are…two different expectations.…I'm expecting the array to include 2,…and I'm expecting the array to include 3.…I'm writing two arguments,…both of them need to be true.…I can use the start_with or end_with matchers…to make an assertion about the values…that the array should start with or end with.…
That can be very handy to see…
- Installing and configuring RSpec
- Writing and running examples
- Defining expectations using matchers
- Using helper methods, before/after hooks, and shared examples
- Creating test doubles using mocks and stubs
- Testing Ruby on Rails with RSpec
- Putting test-driven development into practice
Skill Level Intermediate
1. Introducing RSpec
3. First Steps and Concepts
4. Working with Expectations
5. Testing Efficiently
6. Test Doubles
8. RSpec with Ruby on Rails
9. Test-Driven Development (TDD)
10. Testing Tools
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.