Skip to content
No description, website, or topics provided.
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
README.md
Rakefile

README.md

Erroneous Creatures

This is a collection of the standard Turing Mythical Creatures exercises with a few...obfuscations thrown in.

Specifically, these creatures are "completed" and, in theory, correct. But each one has one or more subtle bugs introduced!

Your job is to use the test suite, error messages, and tools like Pry to fix the mistakes.

Setup

git clone git@github.com:turingschool-examples/erroneous_creatures.git

Suggested Order

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

Common Mistakes

Here are some of the kinds of errors you can expect to find:

  • Syntax errors (files won't run)
  • Misuse of local / instance variables
  • Misuse of boolean types / object truthiness
  • Mixing variable assignment and boolean comparison
  • Mixing of collection and single-object types
  • Probably many more!

Techniques

Remember the techniques we have at our disposal:

  • Use the test suite to get rapid feedback about our code
  • Use Pry to verify assumptions about code, especially verifying values of variables and types of objects
  • Use stacktraces and error messages to understand and zero in on errors
  • Read each stacktrace twice before trying to change any code

Running the Tests

mrspec .

or

rake

or running individual tests using ruby:

ruby unicorn_test.rb

Related Lesson Plan

Meant to be used in combination with the Debugging Techniques Lesson Plan.

You can’t perform that action at this time.