DEV: Update the rubocop setup (#20668)

This commit is contained in:
Jarek Radosz 2023-03-14 11:42:11 +01:00 committed by GitHub
parent f75afc0979
commit bb317bd554
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 7 additions and 7 deletions

View File

@ -412,7 +412,7 @@ GEM
rspec-core (>= 2.14)
rtlcss (0.2.0)
mini_racer (~> 0.6.3)
rubocop (1.48.0)
rubocop (1.48.1)
json (~> 2.3)
parallel (~> 1.10)
parser (>= 3.2.0.0)
@ -426,10 +426,10 @@ GEM
parser (>= 3.2.1.0)
rubocop-capybara (2.17.1)
rubocop (~> 1.41)
rubocop-discourse (3.1.0)
rubocop-discourse (3.2.0)
rubocop (>= 1.1.0)
rubocop-rspec (>= 2.0.0)
rubocop-rspec (2.18.1)
rubocop-rspec (2.19.0)
rubocop (~> 1.33)
rubocop-capybara (~> 2.17)
ruby-prof (1.6.1)

View File

@ -124,7 +124,7 @@ RSpec.describe "spam rules for users" do
end
[[:user, trust_level: TrustLevel[2]], [:admin], [:moderator]].each do |spammer_args|
context "spammer is trusted #{spammer_args[0]}" do
context "if spammer is trusted #{spammer_args[0]}" do
let!(:spammer) { Fabricate(*spammer_args) }
let!(:spam_post) { Fabricate(:post, user: spammer) }
let!(:private_messages_count) { spammer.private_topics_count }

View File

@ -193,7 +193,7 @@ RSpec.describe Report do
let(:report) { Report.find(pluralized) }
context "no #{pluralized}" do
context "with no #{pluralized}" do
it "returns an empty report" do
expect(report.data).to be_blank
end

View File

@ -68,7 +68,7 @@ RSpec.describe ListController do
end
(Discourse.anonymous_filters - [:categories]).each do |filter|
context "#{filter}" do
context "with #{filter}" do
it "succeeds" do
get "/#{filter}"
expect(response.status).to eq(200)

View File

@ -186,7 +186,7 @@ RSpec.describe StaticController do
["tos", :tos_url, I18n.t("js.tos")],
["privacy", :privacy_policy_url, I18n.t("js.privacy")],
].each do |id, setting_name, text|
context "#{id}" do
context "with #{id}" do
context "when #{setting_name} site setting is NOT set" do
it "renders the #{id} page" do
get "/#{id}"