Crash Course Intro to RSpec

stubs and doubles and mocks -- oh my!

Learning how to write tests as a new developer can be daunting. Testing frameworks come with their own set of jargon and paradigms. What are mocks, doubles, stubs, and spies? Who is FactoryGirl? What’s the difference between ‘describe’ and ‘context’?

We’ll cover how to approach your tests, dissect the anatomy of a test, discuss when to use doubles vs data, and how to test different pieces of your app. Navigating tests was a struggle for me when I was getting started, and this workshop will provide a hands-on crash course in the RSpec essentials you need to be effective testing your Rails app.

Workshop Repo

Prerequisites

This workshop assumes a basic familiarity with Ruby, Rails, and MVC architecture. If you're new to Ruby and/or Rails, fear not! Below are some resources that are great for getting started with Ruby and Rails.

What you need to know for this workshop

You just got hired by Reading Meow, a lean start up trying to bring the gift of reading to cats. Reading's Meow's revolutionary app allows kind souls with library cards to go to the library and check out books on behalf of cats! Bored kitties don't have to languish away at home scratching on the same tired chair or expensive piece of furniture. Now, with Reading Meow, they can READ!

You're going to be learning RSpec while on the job building out this app. Reading to get started? Head over to the repo here, to fork, clone, bundle, and get ready to wrangle some RSpec!

results matching ""

    No results matching ""