Open
Conversation
Bank AccountWhat We're Looking For
Great work overall! |
| it "Can find the first account from the CSV" do | ||
| # TODO: Your test code here! | ||
| acct_id_1212 = Bank::Account.find(1212) | ||
| acct_id_1212.must_be_instance_of Bank::Account #Account class |
There was a problem hiding this comment.
In addition to checking that what you got back from Account.find is an account, you should verify that the ID matches what you asked for. As is, find could return any old account and your test would still pass.
| end | ||
|
|
||
| def self.all | ||
| all_accounts = [] #array of classes |
There was a problem hiding this comment.
Good work on Account.all and Account.find, I feel like this implementation is about as clean as it gets.
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.
Bank Account
Congratulations! You're submitting your assignment.
Comprehension Questions
raise ArgumentError? What do you think it's doing?.all&.findmethods class methods? Why not instance methods?.all&.findclass methods were needed to make the csv file available across all accounts instead of on specific instance.|