Ruby TDD with RSpec
RSpec provides a great testing framework for Ruby and Rails. In this lesson we'll use it to build and refactor a Ruby application or two TDD-style while focusing on various aspects of testing generally and RSpec specifically (hopefully seeing some benefits of TDD).
We'll cover features and customizations for RSpec Core, RSpec Expectations, and RSpec Mocks (no RSpec Rails) concentrating on areas of most interest to students.
Students should be familiar with Ruby. Some familiarity with RSpec and/or TDD would be helpful but is not required. All experience levels welcome; the extend of material covered will be based on the experience levels and preferences of the students.
In preparation, you may read or scan the RSpec Core, RSpec Expectations, and RSpec Mocks API documentation. If you are feeling adventurous, as you hopefully are, you can check out more detailed documentation and examples at the official documentation site for RSpec.
Be sure to complete the following Codewars challenge before class!
(If your RailsSchool profile includes your Codewars username, you'll get
a nifty star if you complete the challenge.)