1
0
зеркало из https://github.com/glebtv/telegram-bot.git synced 2026-09-04 02:05:52 +03:00

Fix integration spec for Rails 4

Этот коммит содержится в:
Max Melentiev
2016-11-16 14:34:42 +03:00
родитель 0c9a4a5fa0
Коммит 1098118826

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

@@ -5,8 +5,17 @@ require 'action_dispatch/testing/integration'
RSpec.describe 'Integrations helper', :telegram_bot do
include ActionDispatch::Integration::Runner
def reset_template_assertion; end
let(:app) { Telegram::Bot::Middleware.new(bot, controller) }
let(:app) do
app = Telegram::Bot::Middleware.new(bot, controller)
if ActionPack::VERSION::MAJOR >= 5
app
else
require 'action_dispatch/middleware/params_parser'
ActionDispatch::ParamsParser.new(app)
end
end
let(:bot) { Telegram::Bot::ClientStub.new('token') }
let(:controller_path) { '/' }
let(:controller) do