Giter Site home page Giter Site logo

ruby_testing's Introduction

RSpec Playground

The purpose of this repository is to provide 'hands-on' RSpec lessons. These lessons were designed to equip students of the The Odin Project 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

Run rbenv versions to confirm that you have ruby version 3.0.3 installed. If you do not have this version installed, please refer back to these instructions to install it.

Run bundle install from the root directory.

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 the lib 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 run rspec 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.

ruby_testing's People

Contributors

rlmoser99 avatar thatblindgeye avatar couchoftomato avatar i3uckwheat avatar mlgabe avatar maheshkumar-novice avatar kevinmulhern avatar dm-murphy avatar eduardo06sp avatar lrdvnz avatar mehmetsamilerturk avatar crespire avatar killzabit avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.