Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Structs and OpenStructs

branch: master

Fetching latest commit…

Octocat-spinner-32-eaf2f5

Cannot retrieve the latest commit at this time

Octocat-spinner-32 lib
Octocat-spinner-32 spec
Octocat-spinner-32 Gemfile
Octocat-spinner-32 Guardfile
Octocat-spinner-32 README.md
Octocat-spinner-32 Rakefile
README.md

Week 4

Introduction

This week we take another step towards Test-Driven Development. Similar to how you were asked to make changes the Structs and OpenStructs to make the tests pass. Here again your job is to define the functionality of the methods that are described in the test suite.

Outline

Exercise

  • Fork and clone this repository
  • Fix the tests on a branch
  • Push your changes to Github on that branch

Reading

Exercise

The exercise are laid out in the same way as before, however there are still some subtle differences so I implore you to read the following closely.

  • Fork and clone this repository
  • Run Bundler
  • Run the tests / Setup Guard
  • Switch to the 'solutions' branch
  • Write the methods required to make the examples pass in each of the associated files in the lib directory.
  • Commit your changes to the 'solutions' branch
  • Push your 'solutions' branch up to Github

Switch to the 'solutions' branch

Usually working on the master branch is acceptable behavior. However, there is a common workflow pattern to create a branch and to put work on that branch. Branching in git is easy.

Before you commit any changes that solve this week's exercise I want you to create a solutions branch.

Create the branch

$ git branch solutions

Move to that branch

$ git checkout solutions

Write the methods required to make the examples pass in each of the associated files in the lib directory

A difference from last week, is that you should define the methods in the lib folder in the file that matches the name of spec folder. This is so the implementation of your methods are independent of test files.

That means you will will be writing code that fixes the find_quote_spec.rb in lib/find_quote.rb. Fix the display_superheroes_spec.rb in display_superheroes.rb ...

Commit your changes to the 'solutions' branch

When you created and switched to the solutions branch all work that you add and commit will automatically be added to the solutions branch.

Push your 'solutions' branch up to Github

When you are ready to push your solutions to Github you will specify your new branch name.

$ git push origin solutions

This is nearly identical to the command you ran previously the exception being the word master is now replaced with 'solutions`.

Something went wrong with that request. Please try again.