Space - Leah and Charlotte#17
Conversation
…river & passenger, add find_driver method
…equirements; modify tests to account for those changes
OO Ride ShareMajor Learning Goals/Code Review
Testing Requirements
Overall Feedback
Code Style Bonus AwardsWas the code particularly impressive in code style for any of these reasons (or more...?)
|
beccaelenzil
left a comment
There was a problem hiding this comment.
Good work on this assignment. I've left a few in line comments to review. Most of your methods are very thoroughly tests -- kudos! Request_trip and find_available_driver still code use a few edge case tests. However, it is clear that the learning goals around TDD, object composition, and inheritance were met. Keep up the hard work!
| return self.new( | ||
| id: record[:id], | ||
| passenger_id: record[:passenger_id], | ||
| start_time: record[:start_time], |
There was a problem hiding this comment.
As mentioned in the rubric feedback, it is strongly recommended to use Time.parse in this method to DRY up your code, and negate the need to use Time.parse elsewhere.
| end | ||
|
|
||
|
|
||
| describe "net_expenditures with in-progress trips" do |
There was a problem hiding this comment.
This is a minor note. Typically a describe block is used for a single method, and separate it blocks are used for the different test cases for that method.
| return 0 | ||
| end | ||
|
|
||
| @trips.delete_if { |trip| trip.rating == nil } |
There was a problem hiding this comment.
Good use of an enumerable method.
Assignment Submission: OO Ride Share
Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.
Reflection