Sha256: d5d30b47ff46b894ec223f7b8553193642e483c9703b6217e8ecd63545a04bd9
Contents?: true
Size: 1003 Bytes
Versions: 1
Compression:
Stored size: 1003 Bytes
Contents
require 'spec_helper' describe Lita::Handlers::Wtf, lita_handler: true do it do is_expected.to route_command('wtf is foo').to(:lookup) is_expected.to route_command('wtf foo').to(:lookup) is_expected.to route_command('define foo is bar').to(:define) end describe '#lookup' do it 'responds with the definition of the service' do send_command('define web is Rails. Rails. Rails.') send_command('wtf is web') expect(replies.last).to eq('web is Rails. Rails. Rails.') end it 'responds with the definition of a capitalized service' do send_command('define web is Rails. Rails. Rails.') send_command('wtf is WEB') expect(replies.last).to eq('WEB is Rails. Rails. Rails.') end it 'responds with an error if there is no such service' do send_command('wtf is foo') expect(replies.last).to eq('I don\'t know what foo is, ' \ 'type: define foo is <description> to set it.') end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lita-wtf-1.0.0 | spec/lita/handlers/wtf_spec.rb |