0
0
Fork 0

Fix RSpec/MissingExampleGroupArgument cop (#25310)

This commit is contained in:
Matt Jankowski 2023-06-06 09:51:42 -04:00 committed by GitHub
parent b74c3cd708
commit 6c0e3f490a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
22 changed files with 38 additions and 68 deletions

View file

@ -3,7 +3,7 @@
require 'rails_helper'
RSpec.describe Account do
context do
context 'with an account record' do
subject { Fabricate(:account) }
let(:bob) { Fabricate(:account, username: 'bob') }

View file

@ -9,7 +9,7 @@ RSpec.describe EmailDomainBlock do
context 'when given an e-mail address' do
let(:input) { "foo@#{domain}" }
context do
context 'with a top level domain' do
let(:domain) { 'example.com' }
it 'returns true if the domain is blocked' do
@ -23,7 +23,7 @@ RSpec.describe EmailDomainBlock do
end
end
context do
context 'with a subdomain' do
let(:domain) { 'mail.example.com' }
it 'returns true if it is a subdomain of a blocked domain' do

View file

@ -81,7 +81,7 @@ RSpec.describe Trends::Statuses do
4.times { reblog(status3, today) }
end
context do
context 'when status trends are refreshed' do
before do
subject.refresh(today)
end

View file

@ -44,7 +44,7 @@ RSpec.describe Trends::Tags do
4.times { |i| subject.add(tag2, i, today) }
end
context do
context 'when tag trends are refreshed' do
before do
subject.refresh(yesterday + 12.hours)
subject.refresh(at_time)

View file

@ -118,10 +118,8 @@ RSpec.describe UserRole do
end
end
context do
it 'returns permissions combined with the everyone role' do
expect(subject.computed_permissions).to eq described_class.everyone.permissions
end
it 'returns permissions combined with the everyone role' do
expect(subject.computed_permissions).to eq described_class.everyone.permissions
end
end

View file

@ -363,7 +363,7 @@ RSpec.describe User do
expect(user).to_not be_valid
end
context do
context 'with a blacklisted subdomain' do
around do |example|
old_blacklist = Rails.configuration.x.email_blacklist
example.run