1
0
зеркало из https://github.com/glebtv/telegram-bot.git synced 2026-08-28 15:26:18 +03:00

Add notes on testing multiple bots to readme

Fixes #29
Этот коммит содержится в:
Max Melentiev
2017-05-11 14:01:42 +06:00
родитель 0320507abe
Коммит 9defa42f40

Просмотреть файл

@@ -27,6 +27,8 @@ Run it on your local machine in 1 minute!
And here is [app teamplate](https://github.com/telegram-bot-rb/rails_template)
to generate clean app in seconds.
Examples and cookbook in [wiki](https://github.com/telegram-bot-rb/telegram-bot/wiki).
## Installation
Add this line to your application's Gemfile:
@@ -341,6 +343,8 @@ Telegram::Bot::ClientStub.stub_all!
RSpec.configure do |config|
# ...
config.after { Telegram.bot.reset }
# or for multiple bots:
config.after { Telegram.bots.each_value(&:reset) }
# ...
end
```
@@ -376,6 +380,10 @@ expect(&process_update).
to make_telegram_request(bot, :sendMessage, hash_including(text: 'msg text'))
```
Place integration tests inside `spec/requests`
when using RSpec's `infer_spec_type_from_file_location!`,
or just add `type: :request` to `describe`.
See sample app for more examples.
### Deploying