-
Notifications
You must be signed in to change notification settings - Fork 299
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
Time - Jocelyn #37
base: master
Are you sure you want to change the base?
Time - Jocelyn #37
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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