Sha256: c687bf15801074d498bd822c821f674f61d1ef5635df83af24db0c171775eb85
Contents?: true
Size: 619 Bytes
Versions: 5
Compression:
Stored size: 619 Bytes
Contents
describe SlackRubyBot::Commands do let! :command do Class.new(SlackRubyBot::Commands::Base) do command(/some\s*regex+\?*/) do |client, data, match| client.say(channel: data.channel, text: "#{match[:command]}: #{match[:expression]}") end end end def app SlackRubyBot::App.new end it 'handles regular expressions' do expect(message: "#{SlackRubyBot.config.user} some regex works here").to respond_with_slack_message('some regex: works here') expect(message: "#{SlackRubyBot.config.user} some RegEx?? yep").to respond_with_slack_message('some RegEx??: yep') end end
Version data entries
5 entries across 5 versions & 1 rubygems