зеркало из
https://github.com/glebtv/telegram-bot.git
synced 2026-09-06 11:05:51 +03:00
Update rubopcop (#227)
* Update rubopcop [WIP] * Further rubocop fixes * Fix rubocop-rails cops * Fix spec * Disable rubocop suggestions * Run rubocop in github actions rather than in codeclimate
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
7bcb0caded
Коммит
57b17f068c
@@ -1,3 +1,5 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
RSpec.describe Telegram::Bot::UpdatesController do
|
||||
include_context 'telegram/bot/updates_controller'
|
||||
|
||||
@@ -5,7 +7,7 @@ RSpec.describe Telegram::Bot::UpdatesController do
|
||||
subject { controller.action_for_payload }
|
||||
|
||||
def stub_payload(*fields)
|
||||
Hash[fields.map { |x| [x, double(x)] }]
|
||||
fields.map { |x| [x, double(x)] }.to_h
|
||||
end
|
||||
|
||||
context 'when payload is inline_query' do
|
||||
@@ -90,7 +92,7 @@ RSpec.describe Telegram::Bot::UpdatesController do
|
||||
|
||||
describe '#process' do
|
||||
subject { -> { controller.process(:action, *args) } }
|
||||
let(:args) { %i[arg1 arg2] }
|
||||
let(:args) { %i[arg_1 arg_2] }
|
||||
let(:controller_class) do
|
||||
Class.new(described_class) do
|
||||
attr_reader :acted, :hooked
|
||||
@@ -198,7 +200,7 @@ RSpec.describe Telegram::Bot::UpdatesController do
|
||||
end
|
||||
|
||||
context 'when options hash is given' do
|
||||
let(:controller_args) { [bot, from: from, chat: chat] }
|
||||
let(:controller_args) { [bot, {from: from, chat: chat}] }
|
||||
with_reinitialize do
|
||||
its(:bot) { should eq bot }
|
||||
its(:update) { should eq nil }
|
||||
|
||||
Ссылка в новой задаче
Block a user