зеркало из
https://github.com/glebtv/telegram-bot.git
synced 2026-09-04 10:15:50 +03:00
Telegram.bot raises error when there is no default config
Этот коммит содержится в:
@@ -22,8 +22,13 @@ RSpec.describe Telegram::Bot::ConfigMethods do
|
||||
end
|
||||
|
||||
describe '#bot' do
|
||||
subject { registry.bot }
|
||||
it { should eq registry.bots[:default] }
|
||||
subject { -> { registry.bot } }
|
||||
its(:call) { should eq registry.bots[:default] }
|
||||
|
||||
context 'when bot is not configured' do
|
||||
let(:config) { super().except(:default) }
|
||||
it { should raise_error(/bot is not configured/) }
|
||||
end
|
||||
end
|
||||
|
||||
describe '#bots' do
|
||||
|
||||
Ссылка в новой задаче
Block a user