From 5407c5028fee797f6c96ee7c9c5b7345030f06f9 Mon Sep 17 00:00:00 2001 From: Max Melentiev Date: Tue, 9 Jan 2018 12:00:49 +0300 Subject: [PATCH] Fix specs for rails 4 --- .../bot/updates_controller/instrumentation_spec.rb | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/spec/telegram/bot/updates_controller/instrumentation_spec.rb b/spec/telegram/bot/updates_controller/instrumentation_spec.rb index 6a3c90e..e7f588b 100644 --- a/spec/telegram/bot/updates_controller/instrumentation_spec.rb +++ b/spec/telegram/bot/updates_controller/instrumentation_spec.rb @@ -50,7 +50,12 @@ RSpec.describe Telegram::Bot::UpdatesController::Instrumentation do x.before_action :halter_method def halter_method - throw :abort + require 'active_support/version' + if ActiveSupport::VERSION::MAJOR >= 5 + throw :abort + else + false + end end self