-
Notifications
You must be signed in to change notification settings - Fork 26
Leaves - Alice and Raisah #9
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
base: master
Are you sure you want to change the base?
Conversation
| end | ||
|
|
||
| def self.parse_response(response) | ||
| raise NotImplementedError, "Can't implement recipient 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.
👍 Nice
| puts "User was not found." | ||
| else | ||
| puts "User was selected." | ||
| end |
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 would break these larger chunks of functionality into little helper methods so that this section of code is easier to parse!
| end | ||
|
|
||
| def send_message(message) | ||
| response = HTTParty.post( "#{BASE_URL}/chat.postMessage", body: { token: TOKEN, channel: selected.slack_id, text: message } ) |
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 the future, I'd make a class that wraps all the calls to HTTParty on this specific API. That way, you only have to test those messages in isolation, which gives you more direct tests!
slack.rbWhat We're Looking For
|
slack.rb
Congratulations! You're submitting your assignment!
You and your partner should collaborate on the answers to these questions.
Comprehension Questions