Conversation
| def check_reservation_range(date_one, date_two) | ||
| first_date = date_one < date_two ? date_one : date_two | ||
| second_date = date_one < date_two ? date_two : date_one | ||
| first_date < @end_date && second_date > @start_date |
There was a problem hiding this comment.
Remember the ada way is to use explicit return :)
| @rooms.nil? ? validate_room(@room_ids) : validate_room(@rooms) | ||
| end | ||
|
|
||
| def validate_room(attribute) |
There was a problem hiding this comment.
Consider giving this method a name like validate_block or adding a comment to increase readability.
|
|
||
| describe "Reservation Manager Class - Allow Booking" do | ||
| before do | ||
| @sample = HotelManager::ReservationManager.new() |
There was a problem hiding this comment.
It is good to use meaningful variable names to increase readability. It's not immediately clear what @sample us. Consider @hotel.
| end | ||
| end | ||
|
|
||
| describe "Reservation Manager Class - Double Booking" do |
There was a problem hiding this comment.
I like you test design choice to separate out positive and negative test cases. Consider wrapping these tests in a save_reservation describe block since these tests specifically test that method.
HotelSection 1: Major Learning Goals
Section 2: Code Review and Testing Requirements
Section 3: Feature Requirements
Overall Feedback
Additional FeedbackGreat work on this project! 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 your object oriented design. It is clear by your code and your answers to the reflection questions that you iterated on your design. Furthermore, you've written comprehensive tests that supported your process. Nice work implemented the optional csv class! I've left a few comments of minor ways you might consider refactoring. It is clear that the learning goals around TDD and Object Oriented design were met. Keep up the hard work! Code Style Bonus AwardsWas the code particularly impressive in code style for any of these reasons (or more...?)
|
Assignment Submission: Hotel
Congratulations! You're submitting your assignment. Please reflect on the assignment with these questions.
Reflection