Sha256: 4e5c997817bae6d224d456b454287ea56a54e6d555ff046c7fcfd02cea9c220f

Contents?: true

Size: 479 Bytes

Versions: 5

Compression:

Stored size: 479 Bytes

Contents

# frozen_string_literal: true

describe SlackRubyBot::Commands do
  let! :command do
    Class.new(SlackRubyBot::Commands::Base) do
      operator '='
      operator '-'

      def self.call(client, data, match)
        client.say(channel: data.channel, text: "#{match[:operator]}: #{match[:expression]}")
      end
    end
  end
  def app
    SlackRubyBot::App.new
  end
  it 'supports operators' do
    expect(message: '=2+2').to respond_with_slack_message('=: 2+2')
  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/operators_spec.rb
slack-ruby-bot-0.16.0 spec/slack-ruby-bot/commands/operators_spec.rb
slack-ruby-bot-0.15.0 spec/slack-ruby-bot/commands/operators_spec.rb
slack-ruby-bot-0.14.0 spec/slack-ruby-bot/commands/operators_spec.rb
slack-ruby-bot-0.13.0 spec/slack-ruby-bot/commands/operators_spec.rb