Sha256: 69267467f8039c6fedd5f73222b7a5caf4226b93254661754a139e1328d8ac09
Contents?: true
Size: 714 Bytes
Versions: 14
Compression:
Stored size: 714 Bytes
Contents
require 'telegram/bot/rspec/integration/shared' require 'rack/test' RSpec.shared_context 'telegram/bot/integration/rack' do include_context 'telegram/bot/integration/shared' include Rack::Test::Methods let(:request_path) { raise '`let(:request_path) { path to bot }` is required' } let(:app) { raise '`let(:app) { your rack app here }` is required' } let(:request_headers) do { 'ACCEPT' => 'application/json', 'CONTENT_TYPE' => 'application/json', } end def dispatch(update) post request_path, update.to_json, request_headers end end Telegram::Bot::RSpec.with_include_context do |config| config.include_context 'telegram/bot/integration/rack', telegram_bot: :rack end
Version data entries
14 entries across 14 versions & 1 rubygems