-
Notifications
You must be signed in to change notification settings - Fork 39
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
Queues - Sofia Kim - BankAccounts #21
base: master
Are you sure you want to change the base?
Conversation
Bank AccountWhat We're Looking For
Great work overall! |
end | ||
|
||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work on Account.all
and Account.find
, I feel like this implementation is about as clean as it gets.
Bank Account
Congratulations! You're submitting your assignment.
Comprehension Questions
raise ArgumentError
? What do you think it's doing?.all
&.find
methods class methods? Why not instance methods?.all
&.find
class methods were needed to make the csv file available across all accounts instead of on specific instance.|