Author
Released
2/4/2015- 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
Duration
Views
- [Voiceover] Welcome to Rspec Testing Framework. My name is Kevin Skoglund. In this course, we're going to learn to work with RSpec, the popular framework for testing Ruby code. We will learn how to use RSpec for testing pure Ruby applications and then how to use RSpec to test the different parts of Ruby on RAILS web applications. RSpec is written in Ruby, so this course is intended for developers who already know how to write code in Ruby and now want to learn how to test that code. We will learn the basic syntax of RSpec and see how to write and run tests against code.
We will spend a lot of time exploring the many matchers that RSpec provides that help us to write testing samples for a variety of code situations. We will discover techniques to help make your test more efficient by helping to organize test examples and, therefore, to write less code. We will use test doubles as temporary stand-ins with the power to mimic Ruby objects and behaviors. We will discuss the theory behind test-driven development and demonstrate how it works in practice.
Let's get started learning how to write software tests with RSpec.
Related Courses
-
Ruby on Rails 4 Essential Training
with Kevin Skoglund12h 41m Intermediate -
Code Clinic: Ruby
with Kevin Skoglund5h 42m Intermediate
-
Introduction
-
Welcome1m 10s
-
-
1. Introducing RSpec
-
What is RSpec?4m 2s
-
Thinking in user stories4m 42s
-
Writing good tests6m 57s
-
-
2. Installation
-
Installing Ruby and RubyGems1m 57s
-
Installing RSpec3m 25s
-
Configuration5m 58s
-
-
3. First Steps and Concepts
-
Basic syntax4m 14s
-
Writing specs5m 18s
-
Running specs7m 27s
-
4. Working with Expectations
-
Fundamentals3m 48s
-
Equivalence matchers7m 3s
-
Truthiness matchers5m 41s
-
Numeric comparison matchers3m 32s
-
Collections6m 13s
-
Other useful matchers7m 44s
-
Predicate matchers5m 14s
-
Observation matchers10m 36s
-
Complex expectations10m 43s
-
-
5. Testing Efficiently
-
Helper methods9m 10s
-
Using the let method7m 36s
-
Setting a subject3m 39s
-
Implicitly defined subjects3m 49s
-
Shared examples10m 36s
-
-
6. Test Doubles
-
What are test doubles?4m 36s
-
Using mocks and stubs8m 38s
-
Partial test doubles6m 12s
-
Message expectations5m 44s
-
Message argument constraints4m 46s
-
Message count constraints3m 53s
-
Spies6m 58s
-
-
7. Challenges
-
Food-finder application6m 8s
-
Challenge: NumberHelper5m 49s
-
Solution: NumberHelper3m 8s
-
Challenge: StringExtend2m 6s
-
Solution: StringExtend3m 48s
-
Challenge: Restaurant5m 25s
-
Solution: Restaurant6m 30s
-
Challenge: Guide12m 49s
-
Solution: Guide6m 41s
-
-
8. RSpec with Ruby on Rails
-
Installing9m 32s
-
Generators4m 46s
-
Test database4m 1s
-
Transactional examples4m 28s
-
Model specs5m 1s
-
Helper specs3m
-
Controller specs: Requests7m 31s
-
View specs7m 12s
-
-
9. Test-Driven Development (TDD)
-
What is TDD?6m 12s
-
A TDD example: Part one4m 43s
-
A TDD example: Part two6m 12s
-
A TDD example: Part three4m 50s
-
A TDD example: Part four7m 47s
-
Benefits and disadvantages8m 36s
-
-
10. Testing Tools
-
Fixtures and factories6m 49s
-
Acceptance testing8m 5s
-
Automatic testing3m 44s
-
Other tools2m 33s
-
-
Conclusion
-
Goodbye31s
-
- 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.
CancelTake 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.
Share this video
Embed this video
Video: Welcome