Sha256: 63318dbb8386568b95dc02b8459cf0c800f5ef256fcd465141558fbcf685d2cd
Contents?: true
Size: 713 Bytes
Versions: 2
Compression:
Stored size: 713 Bytes
Contents
require 'spec_helper' describe SlackRubyBot::Bot do let! :command do Class.new(SlackRubyBot::Bot) do command 'bot_spec' do |client, data, match| client.say(channel: data.channel, text: match['expression']) end end end def app SlackRubyBot::Bot.instance end let(:client) { app.send(:client) } it 'sends a message' do expect(client).to receive(:message).with(channel: 'channel', text: 'message') app.send(:message, client, text: "#{SlackRubyBot.config.user} bot_spec message", channel: 'channel', user: 'user') end it 'sends a message' do expect(message: "#{SlackRubyBot.config.user} bot_spec message").to respond_with_slack_message('message') end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
slack-ruby-bot-0.6.1 | spec/slack-ruby-bot/commands/bot_spec.rb |
slack-ruby-bot-0.6.0 | spec/slack-ruby-bot/commands/bot_spec.rb |