Open
Conversation
HotelWhat We're Looking For
|
CheezItMan
reviewed
Mar 25, 2019
spec/reservation_spec.rb
Outdated
| require "date" | ||
|
|
||
| describe "Reservation class" do | ||
| it "lists all reservations" do |
There was a problem hiding this comment.
Looks like you didn't get to testing reservations
| [*(1..20)] | ||
| end | ||
|
|
||
| def reservations_on(in_date, out_date = nil) |
There was a problem hiding this comment.
How could the end date be nil?
Clever use of array methods!
| @@ -0,0 +1,20 @@ | |||
| module Hotel | |||
| class Reservation | |||
There was a problem hiding this comment.
It doesn't look like you're using this class.
| # calculate total cost | ||
| # reserve the blocks | ||
| end | ||
| end |
There was a problem hiding this comment.
BTW next time put .DS_Store in your .gitignore file.
spec/hotel_ledger_spec.rb
Outdated
| expect(rooms).must_equal [*(1..20)] | ||
| end | ||
|
|
||
| it "can reserve a room for a given date range" do |
There was a problem hiding this comment.
You should also verify that you can reserve a room starting on the same date the previous reservation ended.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Hotel
Congratulations! You're submitting your assignment!
Comprehension Questions