Sha256: bd3b74fb4403050aab9c4e25c1cfa410424ecf4bee3f8652ff08c3d2391eba5e
Contents?: true
Size: 721 Bytes
Versions: 8
Compression:
Stored size: 721 Bytes
Contents
describe SlackRubyBot::Commands do let! :command do Class.new(SlackRubyBot::Commands::Base) do command 'tomato' do |client, data, match| client.say(channel: data.channel, text: "#{match[:command]}: #{match[:expression]}") end command 'tomatoes' do |client, data, match| client.say(channel: data.channel, text: "#{match[:command]}: #{match[:expression]}") end end end def app SlackRubyBot::App.new end it 'matches commands' do expect(message: "#{SlackRubyBot.config.user} tomato red").to respond_with_slack_message('tomato: red') expect(message: "#{SlackRubyBot.config.user} tomatoes green").to respond_with_slack_message('tomatoes: green') end end
Version data entries
8 entries across 8 versions & 1 rubygems