turingschool-examples / ruby-exercises

A collection of exercises to practice various aspects of Ruby
MIT License
237 stars 767 forks source link

Seemingly incorrect answer for test in `command-query/exercises/cupcakes_spec.rb` on line 24 #122

Closed brandenge closed 1 year ago

brandenge commented 1 year ago

The 3rd test for the file at command-query/exercises/cupcakes_spec.rb doesn't make sense. It is asking for the sweetest cupcake to be returned, which presumably would mean the cupcake with the most grams of sugar in it. However, the test answer is looking for the cupcake with the least grams of sugar.

Therefore, line 24 which is currently:

expect(cupcakes.sweetest.flavor).to eq('Carrot')

seems like it really should be:

expect(cupcakes.sweetest.flavor).to eq('Caramel')

It also looks like a copy/paste error from the previous test on line 15.