Pandas, Lions, and Zookeepers

Readme Homework


Episode 1 - Lions, Pandas and Zookeepers

An accurate simulation of zookeepers feeding Lions and Pandas

Panda Level

  1. Create a human that likes bacon and tacos, but not bamboo
  2. (Using TDD [write tests first])

Tiger Level

  1. Create a FoodBarge that can be called like:
  2. Test that when the zookeepers gets food for the panda, the panda will eat it
food = foodbarge.food_for(panda)
panda.feed(food)

Eagle Level

  1. Extract Food into a class, rather than a symbol
  2. Create separate Tacos, Wildebeests, etc classes for each food
  3. Rather than comparing Tacos.new, implement the == method so you can do Tacos.new == Tacos.new

Copyright: Jesse Wolgamott, MIT License (See LICENSE)

Pandas, Lions, and Zookeepers

  • Area:

    Databases  
  • Runtime:

    1:05  
  • Tech:

    RSpec  
  • Tags:

    RSpec BDD TDD  

Create interactions between objects as the Zookeeper must figure out what the Pandas and Lions like to eat!

Use mocking, stubbing, and TDD to determine what is correct.

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.

ABOUT RUBY OFF RAILS

Ruby Off Rails is dedicated to accelerating the mastering of Ruby and increasing developer happiness everywhere.

In my software training, I see two distinct sets of programmers: those who know Ruby, and those who haven’t learned it yet. People who learn Ruby have an easier time understanding Rails, gems, and what magic voodoo is going on. And most importantly, they can cast wicked voodoo themselves.