Sha256: fa07a624613abc805b3fbc0003b29cf3b28e1cb27db64367a657605fc607d9aa
Contents?: true
Size: 1.19 KB
Versions: 1
Compression:
Stored size: 1.19 KB
Contents
require 'spec_helper' describe Lita::Handlers::Butt, lita_handler: true do subject { described_class.new(robot) } it { is_expected.to route('butt').to :butt } it { is_expected.to route('btt').to :butt } it { is_expected.to route('buuuuuutt').to :butt } it { is_expected.to route('butts').to :butt } it { is_expected.to route('btts').to :butt } it { is_expected.to route('buuuuuutts').to :butt } describe '#butt' do it 'replies with a butt' do send_message 'butt' expect(replies.last).to eq '(_)_)' end it 'replies with a big ol butt' do send_message 'buuuuuuuuuutt' expect(replies.last).to eq '(__________)__________)' end it 'replies with a small butt' do send_message 'btt' expect(replies.last).to eq '())' end it 'replies with multiple butts' do send_message 'butts' expect(replies.last).to eq '(_)_) (_)_)' end it 'replies with multiple big butts' do send_message 'buuuuutts' expect(replies.last).to eq '(_____)_____) (_____)_____)' end end describe '#escape' do it 'escapes a Slack butt' do expect(subject.escape(subject.make_butt, :slack)).to eq '`(_)_)`' end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lita-butt-0.1.2 | spec/lita/handlers/butt_spec.rb |