CHIPS 8.5 (Part 1): Intro to RSpec
Learn the mechanics of RSpec — the testing tool you’ve been running all semester — by writing specs yourself, first for plain Ruby code. This is part of Module 8, and it comes before CHIPS 8.5 (Part 2): Intro to RSpec on Rails.
CHIPS 8.5 Part 1 is an individual assignment, and it is done entirely on PrairieLearn. There is no repo to clone and nothing to submit on Gradescope.
Goals
- Write unit tests with RSpec:
describe/context/it, expectations, and matchers. - Structure tests as Arrange–Act–Assert.
- Practice the TDD rhythm: red → green → refactor.
What you’ll do
You’ll write specs for small Ruby classes, developing some code test-first, and learn to read RSpec output fluently — failure messages are the primary interface of TDD.
Before you start
Watch Module 8 §8.1–8.2.
Logistics
- Where to work: access PrairieLearn via the link in bCourses.
- Grading: PrairieLearn checks your answers as you go.
- Extensions: everyone automatically gets a 2-day no-penalty extension; see the extension policy.
- Collaboration: this CHIPS is individual — you may discuss high-level approaches with anyone, but write and submit your own work. Sharing answers is academic misconduct. See the AI Use Policy below before using AI tools.
AI Use Policy
This assignment follows the course AI Policy, which will be published on this site before it is needed. Until then, the rule from the Syllabus applies: you must be able to explain everything you submit.