#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 and 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
orattr_accessor
? - How does inheritance work?
- How might you test your classes?
##Resources
Better Specs
Ruby Inheritance
Overriding Methods
Attrs