A Slack Bot that pulls Pixiv information and posts the full image(s) into Slack, with iOS shortcuts.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
449 B

9 years ago
  1. require 'spec_helper'
  2. describe SlackRubyBot do
  3. def app
  4. SlackRubyBot::App.new
  5. end
  6. before do
  7. ENV['SLACK_RUBY_BOT_ALIASES'] = ':emoji: alias'
  8. end
  9. after do
  10. ENV.delete('SLACK_RUBY_BOT_ALIASES')
  11. end
  12. it 'responds to emoji' do
  13. expect(message: ':emoji: hi').to respond_with_slack_message('Hi <@user>!')
  14. end
  15. it 'responds to an alias' do
  16. expect(message: 'alias hi').to respond_with_slack_message('Hi <@user>!')
  17. end
  18. end