Sha256: f1d08cb557d4342f53740e4d2bce276e24d4d3b67f8a3a1228c33f62b8c18216
Contents?: true
Size: 603 Bytes
Versions: 2
Compression:
Stored size: 603 Bytes
Contents
require 'spec_helper' describe SlackRubyBot::Commands do let! :command do Class.new(SlackRubyBot::Commands::Base) do command 'empty_text' def self.call(client, data, _match) client.say(channel: data.channel) end end end def app SlackRubyBot::App.new end let(:client) { app.send(:client) } it 'sends default text' do allow(Giphy).to receive(:random) expect(client).to receive(:message).with(channel: 'channel', text: '') app.send(:message, client, text: "#{SlackRubyBot.config.user} empty_text", channel: 'channel', user: 'user') 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/empty_text_spec.rb |
slack-ruby-bot-0.6.0 | spec/slack-ruby-bot/commands/empty_text_spec.rb |