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.

20 lines
465 B

9 years ago
  1. require 'spec_helper'
  2. describe SlackRubyBot::Commands do
  3. let! :command do
  4. Class.new(SlackRubyBot::Commands::Base) do
  5. operator '='
  6. operator '-'
  7. def self.call(client, data, match)
  8. send_message client, data.channel, "#{match[:operator]}: #{match[:expression]}"
  9. end
  10. end
  11. end
  12. def app
  13. SlackRubyBot::App.new
  14. end
  15. it 'supports operators' do
  16. expect(message: '=2+2').to respond_with_slack_message('=: 2+2')
  17. end
  18. end