Sha256: 2f3a3ac21113005410d9fa29d00382e6f8d518bd44847b9dba68f1fb286c7ddb

Contents?: true

Size: 585 Bytes

Versions: 4

Compression:

Stored size: 585 Bytes

Contents

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

4 entries across 4 versions & 1 rubygems

Version Path
slack-ruby-bot-0.12.0 spec/slack-ruby-bot/commands/commands_regexp_escape_spec.rb
slack-ruby-bot-0.11.2 spec/slack-ruby-bot/commands/commands_regexp_escape_spec.rb
slack-ruby-bot-0.11.1 spec/slack-ruby-bot/commands/commands_regexp_escape_spec.rb
slack-ruby-bot-0.11.0 spec/slack-ruby-bot/commands/commands_regexp_escape_spec.rb