Sha256: 8fcb97b06b0f5313c0557162ea5ebecf5f2a14ac4b1cd39253ae2eee1c44a51a

Contents?: true

Size: 637 Bytes

Versions: 9

Compression:

Stored size: 637 Bytes

Contents

require 'spec_helper'

describe SlackRubyBot::Commands do
  let! :command do
    Class.new(SlackRubyBot::Commands::Base) do
      command 'send_message_spec' do |client, data, match|
        send_message client, data.channel, match['expression']
      end
    end
  end
  def app
    SlackRubyBot::App.new
  end
  let(:client) { app.send(:client) }
  it 'sends a message' do
    expect(SlackRubyBot::Commands::Base).to receive(:send_client_message).with(client, channel: 'channel', text: 'message')
    app.send(:message, client, text: "#{SlackRubyBot.config.user} send_message_spec message", channel: 'channel', user: 'user')
  end
end

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
slack-ruby-bot-bhe-0.5.5.3 spec/slack-ruby-bot/commands/send_message_spec.rb
slack-ruby-bot-0.5.5 spec/slack-ruby-bot/commands/send_message_spec.rb
slack-ruby-bot-0.5.4 spec/slack-ruby-bot/commands/send_message_spec.rb
slack-ruby-bot-0.5.3 spec/slack-ruby-bot/commands/send_message_spec.rb
slack-ruby-bot-0.5.2 spec/slack-ruby-bot/commands/send_message_spec.rb
slack-ruby-bot-0.5.1 spec/slack-ruby-bot/commands/send_message_spec.rb
slack-ruby-bot-0.5.0 spec/slack-ruby-bot/commands/send_message_spec.rb
slack-ruby-bot-0.4.5 spec/slack-ruby-bot/commands/send_message_spec.rb
slack-ruby-bot-0.4.4 spec/slack-ruby-bot/commands/send_message_spec.rb