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