Sha256: cf0012a53473c96a4d5527d7ddfe3f45bc7924f381e99c6a2417fd8946b248e0

Contents?: true

Size: 499 Bytes

Versions: 6

Compression:

Stored size: 499 Bytes

Contents

require 'spec_helper'

describe SlackRubyBot::Commands::Unknown do
  def app
    SlackRubyBot::App.new
  end
  let(:client) { app.send(:client) }
  it 'invalid command' do
    expect(message: "#{SlackRubyBot.config.user} foobar").to respond_with_slack_message("Sorry <@user>, I don't understand that command!")
  end
  it 'does not respond to sad face' do
    expect(SlackRubyBot::Commands::Base).to_not receive(:send_message)
    SlackRubyBot::App.new.send(:message, client, text: ':((')
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
slack-ruby-bot-0.4.5 spec/slack-ruby-bot/commands/unknown_spec.rb
slack-ruby-bot-0.4.4 spec/slack-ruby-bot/commands/unknown_spec.rb
slack-ruby-bot-0.4.3 spec/slack-ruby-bot/commands/unknown_spec.rb
slack-ruby-bot-0.4.2 spec/slack-ruby-bot/commands/unknown_spec.rb
slack-ruby-bot-0.4.1 spec/slack-ruby-bot/commands/unknown_spec.rb
slack-ruby-bot-0.4.0 spec/slack-ruby-bot/commands/unknown_spec.rb