Sha256: 81e32ebfbd309e6b19c1a381f8b0155e672f6b9326f2010509aafd63bcf2ea8c
Contents?: true
Size: 559 Bytes
Versions: 1
Compression:
Stored size: 559 Bytes
Contents
require 'spec_helper' describe SlackRubyBot::Commands do let! :command do Class.new(SlackRubyBot::Commands::Base) do command 'nil_text' def self.call(_client, data, _match) send_message cilent, data.channel, nil end end end def app SlackRubyBot::App.new end let(:client) { app.send(:client) } it 'ignores nil messages' do allow(Giphy).to receive(:random) expect(client).to_not receive(:message) app.send(:message, client, Hashie::Mash.new(text: nil, channel: 'channel', user: 'user')) end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
slack-ruby-bot-0.6.2 | spec/slack-ruby-bot/commands/nil_message_spec.rb |