Sha256: bceb4964f6fe3b5d65f1978b767782b2709f354d7bfb57a2a8795b690e08cb0e

Contents?: true

Size: 509 Bytes

Versions: 5

Compression:

Stored size: 509 Bytes

Contents

# frozen_string_literal: true

describe SlackRubyBot::Commands do
  let! :command do
    Class.new(SlackRubyBot::Commands::Base) do
      scan(/(\$[A-Z]+)/) do |client, data, captures|
        client.say(channel: data.channel, text: "There were #{captures.count} captures: #{captures.join(', ')}.")
      end
    end
  end
  def app
    SlackRubyBot::App.new
  end
  it 'captures' do
    expect(message: 'quote $YHOO and $MSFT').to respond_with_slack_message('There were 2 captures: $YHOO, $MSFT.')
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
slack-ruby-bot-0.16.1 spec/slack-ruby-bot/commands/scan_spec.rb
slack-ruby-bot-0.16.0 spec/slack-ruby-bot/commands/scan_spec.rb
slack-ruby-bot-0.15.0 spec/slack-ruby-bot/commands/scan_spec.rb
slack-ruby-bot-0.14.0 spec/slack-ruby-bot/commands/scan_spec.rb
slack-ruby-bot-0.13.0 spec/slack-ruby-bot/commands/scan_spec.rb