Sha256: 995970166bad483e9bc0a9c79a27bb27b35f8a8a59a8c593c2ea7d61842b75f4

Contents?: true

Size: 616 Bytes

Versions: 5

Compression:

Stored size: 616 Bytes

Contents

# frozen_string_literal: true

describe SlackRubyBot::Commands do
  let! :command do
    Class.new(SlackRubyBot::Commands::Base) do
      command '(' do |client, data, match|
        client.say(channel: data.channel, text: "#{match[:command]}: #{match[:expression]}")
      end
    end
  end

  def app
    SlackRubyBot::App.new
  end

  it 'does not return error' do
    expect(message: "#{SlackRubyBot.config.user} ( /").to respond_with_slack_message('(: /')
  end

  it 'allows multiline expression' do
    expect(message: "#{SlackRubyBot.config.user} (\n1\n2").to respond_with_slack_message("(: 1\n2")
  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/commands_regexp_escape_spec.rb
slack-ruby-bot-0.16.0 spec/slack-ruby-bot/commands/commands_regexp_escape_spec.rb
slack-ruby-bot-0.15.0 spec/slack-ruby-bot/commands/commands_regexp_escape_spec.rb
slack-ruby-bot-0.14.0 spec/slack-ruby-bot/commands/commands_regexp_escape_spec.rb
slack-ruby-bot-0.13.0 spec/slack-ruby-bot/commands/commands_regexp_escape_spec.rb