Sha256: a4aab25e570f21cb072adbb7e9fce7b852127cb4c5f2f6a96ad0bb4a577668a9

Contents?: true

Size: 706 Bytes

Versions: 2

Compression:

Stored size: 706 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 'invalid command with @bot:' do
    expect(message: "<@#{SlackRubyBot.config.user_id}>: 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, Hashie::Mash.new(text: ':(('))
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
slack-ruby-bot-0.7.0 spec/slack-ruby-bot/commands/unknown_spec.rb
slack-ruby-bot-0.6.2 spec/slack-ruby-bot/commands/unknown_spec.rb