Sha256: 428418404677ec73c0a7e9695f1d9f61c902325137f57e274eb4fc470ab4ee9c

Contents?: true

Size: 929 Bytes

Versions: 1

Compression:

Stored size: 929 Bytes

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) }

  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
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
lita-butt-0.1.1 spec/lita/handlers/butt_spec.rb