Sha256: 487ab80f1d97666a6632eaece265209c75f578321a3de28387d7a1ccebb3ea6c

Contents?: true

Size: 449 Bytes

Versions: 8

Compression:

Stored size: 449 Bytes

Contents

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

8 entries across 8 versions & 1 rubygems

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