Sha256: ec22d7315921206ba72172c11f32aa067c190390f83c25747be45a2afaa94f0c

Contents?: true

Size: 478 Bytes

Versions: 8

Compression:

Stored size: 478 Bytes

Contents

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

8 entries across 8 versions & 1 rubygems

Version Path
slack-ruby-bot-0.12.0 spec/slack-ruby-bot/commands/scan_spec.rb
slack-ruby-bot-0.11.2 spec/slack-ruby-bot/commands/scan_spec.rb
slack-ruby-bot-0.11.1 spec/slack-ruby-bot/commands/scan_spec.rb
slack-ruby-bot-0.11.0 spec/slack-ruby-bot/commands/scan_spec.rb
slack-ruby-bot-0.10.5 spec/slack-ruby-bot/commands/scan_spec.rb
slack-ruby-bot-0.10.4 spec/slack-ruby-bot/commands/scan_spec.rb
slack-ruby-bot-0.10.3 spec/slack-ruby-bot/commands/scan_spec.rb
slack-ruby-bot-0.10.2 spec/slack-ruby-bot/commands/scan_spec.rb