/trick_treat_2203

A revised clone of objects-and-methods directory from ruby-exercises repo.

Primary LanguageRuby

Objects and Methods

Exercise 1

If you'd like to be walked through the exercise, check out the Objects and Methods workshop on the Jumpstart Lab tutorials site.

These tests have been written for you. Write code to make the tests pass in the following sequence:

  • spec/candy_spec.rb
  • spec/bag_spec.rb
  • spec/costume_spec.rb
  • spec/trick_or_treater_spec.rb

Run a test file by calling it with rspec in your Terminal:

$ rspec spec/candy_spec.rb

Exercise 2

Each object has become a little bit more complex.

Make the tests pass in the following sequence:

  • spec/candy_spec.rb
  • spec/bag_spec.rb
  • spec/costume_spec.rb
  • spec/trick_or_treater_spec.rb