Sha256: 4648990c18412deaa5b55737a6b00f8c889edd4358f2d0ecdb7a1fdb9ffbc37e
Contents?: true
Size: 656 Bytes
Versions: 4
Compression:
Stored size: 656 Bytes
Contents
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
4 entries across 4 versions & 1 rubygems