Sha256: 5f572b6aa8aff6ca04d128c617df5947ad31fb964a269b9829ebde1d0d7ce568
Contents?: true
Size: 687 Bytes
Versions: 5
Compression:
Stored size: 687 Bytes
Contents
# frozen_string_literal: true describe RSpec do let! :command do Class.new(SlackRubyBot::Commands::Base) do command 'raise' do |_client, _data, match| raise ArgumentError, match[:command] end attachment 'raise' do |_client, data, _match| raise ArgumentError, data.attachments[0].pretext end end end def app SlackRubyBot::App.new end it 'respond_with_error' do expect(message: "#{SlackRubyBot.config.user} raise").to respond_with_error(ArgumentError, 'raise') end it 'respond_with_error_using_attachment_match' do expect(attachments: { pretext: 'raise' }).to respond_with_error(ArgumentError, 'raise') end end
Version data entries
5 entries across 5 versions & 1 rubygems