Sha256: 7e583fb8b7821783bdd498e6938ccb4b14e6884a320c054cf9282050303794b8

Contents?: true

Size: 480 Bytes

Versions: 5

Compression:

Stored size: 480 Bytes

Contents

# frozen_string_literal: true

describe SlackRubyBot::Commands do
  let! :command do
    Class.new(SlackRubyBot::Commands::Base) do
      match(/^Reticulate (?<spline_name>\w*)$/) do |client, data, match|
        client.say(channel: data.channel, text: "Reticulated #{match[:spline_name]}.")
      end
    end
  end
  def app
    SlackRubyBot::App.new
  end
  it 'matches' do
    expect(message: 'Reticulate spline').to respond_with_slack_message('Reticulated spline.')
  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/match_spec.rb
slack-ruby-bot-0.16.0 spec/slack-ruby-bot/commands/match_spec.rb
slack-ruby-bot-0.15.0 spec/slack-ruby-bot/commands/match_spec.rb
slack-ruby-bot-0.14.0 spec/slack-ruby-bot/commands/match_spec.rb
slack-ruby-bot-0.13.0 spec/slack-ruby-bot/commands/match_spec.rb