Skip to content

teresamychu/tdd_workshop

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 

Repository files navigation

Test Driven Development Workshop

This workshop is based on Sandi Metz 99 Bottles of OOP book

Setup The Workshop

  1. Install Homebrew
    Verify whether you have Homebrew installed, run the following command in your terminal

    • which brew

    If nothing is returned, you'll need to install Homebrew

    • ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  2. Install Git
    Verify whether you have Git installed, run the following command in your terminal

    • which git

    If nothing is returned, you'll need to install Git

    • brew install git
  3. Install Bundler Verify whether you have bundler installed, run the following command in your terminal

    • which bundler

    If nothing is returned, you'll need to install bundler

    • sudo gem install bundler
  4. Clone the tdd_workshop project into your desired project folder

    • git clone [email protected]:teresamychu/tdd_workshop.git

    • Navigate to the notes directory and run the following commands

      • bundle install
      • bundle exec guard
    • Once guard is running:

      • You can press Enter to run all tests AND
      • Guard should run all tests whenever you save changes in the project (sometimes it doesnt work) .

You are ready to start the workshop!

Workshop Details

  • The goal of this exercise is to take a working solution and refactor it until there is as little repetition as possible.
  • Here are the steps of the workshop:
    • Run guard (Guard should be running at all times during the exercise)
      • See above for instructions.
    • Open the bottles.rb file:
      • Choose two chunks of the code that are the most similar.
      • Refactor the code to remove the smallest difference between these two chunks.
        • If your changes cause tests to fail, undo the changes until the tests are passing again and retry.
      • Repeat with the next part of the code that is the most similar.
      • Continue until there is the least amount of repetition in your solution.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages