Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rlmoser99/ruby_rspec_top
A tutorial that I developed for students at The Odin Project to learn RSpec.
https://github.com/rlmoser99/ruby_rspec_top
rspec
Last synced: about 2 months ago
JSON representation
A tutorial that I developed for students at The Odin Project to learn RSpec.
- Host: GitHub
- URL: https://github.com/rlmoser99/ruby_rspec_top
- Owner: rlmoser99
- Created: 2020-05-30T01:51:51.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-30T20:46:29.000Z (almost 4 years ago)
- Last Synced: 2024-10-22T23:25:38.348Z (3 months ago)
- Topics: rspec
- Language: Ruby
- Homepage: https://github.com/TheOdinProject/ruby_testing
- Size: 437 KB
- Stars: 2
- Watchers: 1
- Forks: 10
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# RSpec Playground (no longer maintained)
This repository was a contribution to an open-source web development curriculum called [The Odin Project](https://www.theodinproject.com/). It is included in this [testing lesson](https://www.theodinproject.com/courses/ruby-programming/lessons/testing-your-ruby-code) and is maintained on their [github](https://github.com/TheOdinProject/ruby_testing).## Purpose
The purpose of this repository is to provide 'hands-on' RSpec lessons. These lessons were designed to equip students to write tests for their Tic-Tac-Toe and to TDD their Connect Four.## Topics
These lessons cover many topics, but it does not cover everything that RSpec is capable of testing. You should expect to learn foundational knowledge on the following topics:
- Let Variables
- Implicit and Explicit Subject
- A variety of built-in-matchers
- Setting values for instance variables to create test conditions
- The 'Arrange, Act & Assert' testing pattern
- Stubs, Mocks, and Doubles
- Test Driven Development## Set-Up
To install RSpec, run `bundle install` from the root directory of this project.## How to use this playground
These lessons are numbered 01 - 16, in the **spec** folder. Start with the file:spec/01_string_spec.rb
. The first 9 lessons are self-contained in the spec file. Starting with lesson 10, there will be 1-3 corresponding files in thelib
folder.If you get stuck on a lesson, there is a corresponding answer file located in the
spec_answer
folder.## Running Tests
Since this repository is full of tests, it is recommended to only runrspec
on one individual file at at time. For example, to run the first test file from the root of this directory:rspec spec/01_string_spec.rb
Tip: If you have tab completion set-up, you can hit 'tab' after the first few characters of the file name.