-
Notifications
You must be signed in to change notification settings - Fork 37
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
Alison's Ride Share #12
base: master
Are you sure you want to change the base?
Conversation
… working right now
…iving miss daisy was a sketchy movie!
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.
Just a few comments
|
||
|
||
|
||
it "All elements in the Driver instance match the data in the CSV file" do |
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.
Since you're not testing all elements here, I would either make a loop that tests them all or at least change the title here.
end | ||
|
||
it "Raises an Error for an incorrect " do | ||
proc { RideShare::Driver.find(116) }.must_raise ArgumentError |
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.
I would suggest that here, you should just return nil if they try to find a Driver that doesn't exist.
def self.all | ||
riders = [] | ||
|
||
CSV.open("support/riders.csv").each do |line| |
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.
Should be tabbed over!
Ride ShareWhat We're Looking For
SummaryNicely done, it does seem like you missed a test for |
it "Every item in the array is an instance of driver" do | ||
@previous_drivers.each do |driver| | ||
driver.must_be_instance_of RideShare::Driver | ||
end |
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.
You should also make sure it's the correct drivers.
Ride Share
Congratulations! You're submitting your assignment!
Comprehension Questions