Sha256: 722e8168665b1b751ed91edcd512950640cb8451de7e6d4003603c4991a5772b

Contents?: true

Size: 459 Bytes

Versions: 5

Compression:

Stored size: 459 Bytes

Contents

# frozen_string_literal: true

shared_examples 'a slack ruby bot' do
  context 'not configured' do
    before do
      @slack_api_token = ENV.delete('SLACK_API_TOKEN')
      SlackRubyBot.configure { |config| config.token = nil }
    end
    after do
      ENV['SLACK_API_TOKEN'] = @slack_api_token
    end
    it 'requires SLACK_API_TOKEN' do
      expect { described_class.instance }.to raise_error RuntimeError, 'Missing Slack API Token.'
    end
  end
end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
slackrb-0.17.1 lib/slack-ruby-bot/rspec/support/slack-ruby-bot/it_behaves_like_a_slack_bot.rb
slackrb-0.17.0 lib/slack-ruby-bot/rspec/support/slack-ruby-bot/it_behaves_like_a_slack_bot.rb
slack-ruby-bot-0.16.1 lib/slack-ruby-bot/rspec/support/slack-ruby-bot/it_behaves_like_a_slack_bot.rb
slack-ruby-bot-0.16.0 lib/slack-ruby-bot/rspec/support/slack-ruby-bot/it_behaves_like_a_slack_bot.rb
slack-ruby-bot-0.15.0 lib/slack-ruby-bot/rspec/support/slack-ruby-bot/it_behaves_like_a_slack_bot.rb