Skip to content

saasbook/hw-rspec-rails-intro

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CHIP 8.5: Intro to Rspec and TDD

In this assignment you will take a deep dive into both the concepts and mechanics of doing test-driven development (TDD) with the RSpec testing framework, using the Guard tool to automatically re-run tests as you change code and using Webmock to provide "canned" responses for tests that exercise code that communicates with an external service. The basic flow of TDD is red-green-refactor: write a test that fails (red), add code to make that test pass (green), look for opportunities to clean up your code and tests (refactor), repeat until all test cases are done.

The assignment is a divided into the following parts:

  1. Basic setup of RSpec and Guard, and how to manually and automatically run specs
  2. From red to green: getting the first spec to pass
  3. From green to refactor: more controller specs and DRYing out tests
  4. The model spec: stubbing the Internet with Webmock

About

CHIPS 8.5

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 8