Skip to content

A TDD challenge exploring inheritance, OOP & reviewing broken code

Notifications You must be signed in to change notification settings

paircolumbus/FixTheTreeTDD

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Fix The Apple Tree TDD

Skill Level: Beginner

The tree.rb script is incomplete. The script should model an apple tree that grows over the years. We should create/plant it, wait for it to bear fruit, pick the fruit and then eventually the tree should die.

Instructions

  • Run your tests: bundle exec rspec
  • Fix the issues that surface
  • Before you begin working on a method, think about what it should return and write it's test first

NOTE: Uncomment the tree_data method at the end of your file and if your script has been crafted correctly, it should print some information about your tree and its fruit.

Considerations

  • What does super do?
  • What's the difference between attr_reader, attr_writer or attr_accessor?
  • How does inheritance work?
  • How might you test your classes?

Resources

About

A TDD challenge exploring inheritance, OOP & reviewing broken code

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages