Conversation
git status
HotelWhat We're Looking ForTest Inspection
Code Review
Overall FeedbackYou're off to a good start! 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 broke down complicated logic into helper methods. This is particularly evident in the methods you wrote for the I do see some room for improvement around putting all the pieces together so that they all work together. You wrote solid methods for checking for valid reservations, but these were never invoked. When we refactor in a couple weeks, I am excited to see how you can bring all the pieces together to meet all the requirements of Waves 1 and 2. |
| return @reservations | ||
| end | ||
|
|
||
| # def self.find(date_range_object) |
There was a problem hiding this comment.
Remove commented code before turning in.
| RATE = 200.0 | ||
|
|
||
| def initialize room_num = nil | ||
| unless room_num.to_i > 0 |
There was a problem hiding this comment.
This is a good use of an ArgumentError
| end | ||
|
|
||
| def create_reservation(room_num: nil, start_date: start_date, end_date: end_date, rate: nil) | ||
| #reservation_validation(start_date, end_date) |
There was a problem hiding this comment.
This looks like a useful method. Why don't you use it?
| @reservations << new_reservation | ||
| end | ||
|
|
||
| def reservation_validation(start_date, end_date) |
There was a problem hiding this comment.
This looks like a useful method, and makes good use of the overlap_check method from Reservation_Date. You are on the right track.
| end | ||
| end | ||
|
|
||
| # def reservation_check_all |
|
|
||
| it "Checks for a Valid Date" do | ||
| expect { | ||
| Hotel::Reservation_Date.new("2019-02-30", "2001-02-03") |
There was a problem hiding this comment.
Consider storing these dates in variables to separate our Arranging, Acting, and Asserting
| @@ -0,0 +1,93 @@ | |||
| require_relative 'test_helper' | |||
|
|
|||
| describe "Date" do | |||
There was a problem hiding this comment.
Since this file is a suite of tests for Reservation_Date give it the title reservation_date_test
| }.must_raise ArgumentError | ||
| end | ||
|
|
||
| it "Calculates Date Range (Num of Nights)" do |
There was a problem hiding this comment.
Great set of tests! You also need this when you're creating a reservation.
Hotel
Congratulations! You're submitting your assignment!
Comprehension Questions