Skip to content

Latest commit

 

History

History
45 lines (33 loc) · 1.6 KB

README.md

File metadata and controls

45 lines (33 loc) · 1.6 KB

Mythical Creatures

A collection of simple exercises to practice Ruby and TDD

Suggested Order

  • unicorn_test.rb done
  • vampire_test.rb done
  • dragon_test.rb done
  • hobbit_test.rb done
  • pirate_test.rb done
  • wizard_test.rb done
  • medusa_test.rb done
  • werewolf_test.rb done
  • centaur_test.rb done

Extra Challenges

Testing with RSpec

For the majority of the class we use minitest because there's so little to learn about the API. But a huge part of the Ruby community favors the expressiveness of RSpec.

The Dreaded if Statement

Can you complete implementations of each of the creatures without using if statements? Think about how removing them affects your code. Remember that a case is just a different form of if, so don't use it.

Imagine Two Creatures

Can you add two new creatures to the repository? How about a Hydra? Add minitest tests exercising some of the following concepts:

  • Passing data into initialize
  • Using methods to change the internal state of an instance
  • Using methods to query the internal state of an instance
  • Functionality that necessitates the internal use of an Array