-
Notifications
You must be signed in to change notification settings - Fork 50
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
Branches - Amal #39
base: master
Are you sure you want to change the base?
Branches - Amal #39
Conversation
HotelWhat We're Looking ForTest Inspection
Code Review
Overall FeedbackGreat work overall! You've built your first project with minimal starting code. This represents an incredible milestone in your journey, and you should be proud of yourself! I am particularly impressed by the way that you tested lots of specific details about the results from methods. |
hotel.create_reservation(4, Date.new(2019, 2, 11), Date.new(2019, 2, 14)) | ||
hotel.create_reservation(5, Date.new(2019, 2, 11), Date.new(2019, 2, 14)) | ||
available_rooms = hotel.find_available_room(Date.new(2019, 2, 5), Date.new(2019, 2, 9)) | ||
expect(available_rooms[0]).must_equal 3 |
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 love how thorough your tests are here with very specific expectations!
I'm confused though why room 3 is returned when it's already reserved starting on the 8th and the request has a checkout date of the 9th.
test/hotel_booker_test.rb
Outdated
expect(hotel.reservations[1].length).must_equal 1 | ||
expect(hotel.reservations[2].length).must_equal 1 | ||
end | ||
it "checks that new reservations can start on checkout days" 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.
I wanna point out that there's some inconsistency around naming. Some of your test names describe what the source code should do and some describe what the test does. Conventionally, the former is preferred.
Hotel
Congratulations! You're submitting your assignment!
Comprehension Questions