Skip to content
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

Aurora Anderson Ride Share #47

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

auroralemieux
Copy link

Ride Share

Congratulations! You're submitting your assignment!

Comprehension Questions

Question Answer
Describe a design decision you had to make when working on this project. What options were you considering? What helped you make your final decision? Once I saw that Driver and Rider had instance methods that would use Trip's all_with_driver and all_with_driver methods, it became clear that the latter two needed to be class methods. I attempted to reuse methods and stay DRY as much as possible.
Describe a concept that you gained more clarity on as you worked on this assignment. I gained a better understanding of what sorts of tests to write (not just how to write tests, but which tests to write). Now I can approach writing my edge cases with the mindset of "how could this be incorrectly implemented, and what could happen because of that?" instead of just "is an error raised when incorrect arguments are passed in?"
Describe a nominal test that you wrote for this assignment. Trip.all has the nominal case "all elements are Trip instances", to check that it is behaving as expected and converting all csv data to Trip instances.
Describe an edge case test that you wrote for this assignment. For the same method, Trip.all, I tested to make sure that the first csv data line and the last, and a random middle one are imported.
How do you feel you did in writing pseudocode first, then writing the tests and then the code? I feel like it really worked for me, and helped me organize my thoughts and process. I took the description of each method from the assignment and wrote my it statements for my tests, then pseudocoded the methods themselves, then wrote the tests for them.

it "grabs first line of data from csv" do
test_driver = nil
test_driver = all_drivers.find {|driver| driver.id == 1}
test_driver.must_be_kind_of Driver

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You might also need to include a check to make sure the driver's name matches.

@CheezItMan
Copy link

Ride Share

What We're Looking For

Feature Feedback
Baseline
Used Git Regularly Good regular commits and nice commit messages.
Answer comprehension questions Check, and I'm glad pseudo-code worked for you.
Driver
Uses the all method in the find method Check
Has appropriate edge-case tests for each method in the class Check & nice use of the trip methods to test the driver methods. You might also need to include a check for the first driver with find, to make sure the data of that driver is correct.
Created a method that uses a method from the Trip object to retrieve the list of trips Check
Created a method that uses the internal trips list to calculate the average rating Check
Rider
Uses the all method in the find method Check
Has appropriate edge-case tests for each method in the class You might want to check to make sure that get_trips returns the correct number of trips. Similar edge case to the issue in Driver as well. These are small nitpicks.
Created a method that uses a method from the Trip object to retrieve the list of trips Check
Created a method that uses the internal trips method to retrieve the associated drivers Check
Trip
Reads the CSV file in the all method Check
Has appropriate edge-case tests for each method in the class Similar testing edge cases, but otherwise good.
Created a method that uses a method from the Driver to retrieve the associated driver instance Check
Created a method that uses a method from the Rider to retrieve the associated rider instance Check
Created a method to retrieve all trips by driver id Check
Created a method to retrieve all trips by rider id Check

Summary

Nicely done, a few nitpicks with testing, but this was good!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants