Sha256: 3862abfed00175028ace3d71768efafbb0f14f889c756f82379609def11cab65
Contents?: true
Size: 741 Bytes
Versions: 5
Compression:
Stored size: 741 Bytes
Contents
# frozen_string_literal: true describe SlackRubyBot::Commands::Unknown do it 'invalid command' do expect(message: "#{SlackRubyBot.config.user} foobar").to respond_with_slack_message("Sorry <@user>, I don't understand that command!") end it 'invalid command with @bot:' do expect(message: "<@#{SlackRubyBot.config.user_id}>: foobar").to respond_with_slack_message("Sorry <@user>, I don't understand that command!") end it 'does not respond to sad face' do client = SlackRubyBot::Client.new message_hook = SlackRubyBot::Hooks::Message.new expect(SlackRubyBot::Commands::Base).to_not receive(:send_message) message_hook.call(client, Hashie::Mash.new(text: ':((', channel: 'channel', user: 'user')) end end
Version data entries
5 entries across 5 versions & 1 rubygems