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.
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.
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