1
0
зеркало из https://github.com/glebtv/telegram-bot.git synced 2026-09-08 03:45:52 +03:00
* Update rubopcop [WIP]

* Further rubocop fixes

* Fix rubocop-rails cops

* Fix spec

* Disable rubocop suggestions

* Run rubocop in github actions rather than in codeclimate
Этот коммит содержится в:
Max Melentiev
2023-12-30 15:20:27 +00:00
коммит произвёл GitHub
родитель 7bcb0caded
Коммит 57b17f068c
82 изменённых файлов: 303 добавлений и 134 удалений

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

@@ -1,3 +1,5 @@
# frozen_string_literal: true
module Telegram
module Bot
module RSpec
@@ -61,14 +63,14 @@ module Telegram
attr_reader :performed_requests, :description
def initialize(bot, action, description: nil)
def initialize(bot, action, description: nil) # rubocop:disable Lint/MissingSuper
@bot = bot
@action = action
@description = description || "make #{action} telegram request"
exactly(1)
end
def matches?(proc) # rubocop:disable AbcSize
def matches?(proc) # rubocop:disable Metrics/AbcSize
raise ArgumentError, 'matcher only supports block expectations' unless proc.is_a?(Proc)
original_requests_count = bot.requests[action].count
proc.call