-
Notifications
You must be signed in to change notification settings - Fork 45
Ampers: Nora Peters #33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Grocery StoreWhat We're Looking For
When I checked out your code and ran the tests, a lot of the tests broke because of Great job on the project overall! It hits all of the requirements and works as expected. I only have a few comments on small ways to improve the code stylistically:
Otherwise the tests are great! Overall you pulled out repeated code into Good work overall! |
specs/online_order_spec.rb
Outdated
| Grocery::OnlineOrder.all.first.id.must_equal 1 | ||
| Grocery::OnlineOrder.all.first.products.must_equal first_row_online_products | ||
| Grocery::OnlineOrder.all.first.customer_id.must_equal 25 | ||
| Grocery::OnlineOrder.all.first.status.must_equal :complete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Every time you have Grocery::OnlineOrder.all.first, you're calling and invoking and running Grocery::OnlineOrder.all. Which isn't a bad thing!
But it would be all the same/have less code if you just assigned the result of Grocery::OnlineOrder.all to a local variable at the top of this method:
order = Grocery::OnlineOrder.all.first
order.id.must_equal 1
order.products.must_equal first_row_online_products
order.customer_id.must_equal 25
order.status.must_equal :complete
…. Customer class and specs still incomplete
Grocery Store
Congratulations! You're submitting your assignment.
Comprehension Questions
raise ArgumentError?.all&.findmethods class methods? Why not instance methods?