0
0
Fork 0

Fix RSpec/ContextWording cop (#24739)

This commit is contained in:
Matt Jankowski 2023-05-03 23:49:08 -04:00 committed by GitHub
parent cf18cc2891
commit 710745e16b
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
105 changed files with 559 additions and 668 deletions

View file

@ -19,7 +19,7 @@ RSpec.describe AccountRelationshipsPresenter do
let(:account_ids) { [Fabricate(:account).id] }
let(:default_map) { { 1 => true } }
context 'options are not set' do
context 'when options are not set' do
let(:options) { {} }
it 'sets default maps' do
@ -32,7 +32,7 @@ RSpec.describe AccountRelationshipsPresenter do
end
end
context 'options[:following_map] is set' do
context 'when options[:following_map] is set' do
let(:options) { { following_map: { 2 => true } } }
it 'sets @following merged with default_map and options[:following_map]' do
@ -40,7 +40,7 @@ RSpec.describe AccountRelationshipsPresenter do
end
end
context 'options[:followed_by_map] is set' do
context 'when options[:followed_by_map] is set' do
let(:options) { { followed_by_map: { 3 => true } } }
it 'sets @followed_by merged with default_map and options[:followed_by_map]' do
@ -48,7 +48,7 @@ RSpec.describe AccountRelationshipsPresenter do
end
end
context 'options[:blocking_map] is set' do
context 'when options[:blocking_map] is set' do
let(:options) { { blocking_map: { 4 => true } } }
it 'sets @blocking merged with default_map and options[:blocking_map]' do
@ -56,7 +56,7 @@ RSpec.describe AccountRelationshipsPresenter do
end
end
context 'options[:muting_map] is set' do
context 'when options[:muting_map] is set' do
let(:options) { { muting_map: { 5 => true } } }
it 'sets @muting merged with default_map and options[:muting_map]' do
@ -64,7 +64,7 @@ RSpec.describe AccountRelationshipsPresenter do
end
end
context 'options[:requested_map] is set' do
context 'when options[:requested_map] is set' do
let(:options) { { requested_map: { 6 => true } } }
it 'sets @requested merged with default_map and options[:requested_map]' do
@ -72,7 +72,7 @@ RSpec.describe AccountRelationshipsPresenter do
end
end
context 'options[:requested_by_map] is set' do
context 'when options[:requested_by_map] is set' do
let(:options) { { requested_by_map: { 6 => true } } }
it 'sets @requested merged with default_map and options[:requested_by_map]' do
@ -80,7 +80,7 @@ RSpec.describe AccountRelationshipsPresenter do
end
end
context 'options[:domain_blocking_map] is set' do
context 'when options[:domain_blocking_map] is set' do
let(:options) { { domain_blocking_map: { 7 => true } } }
it 'sets @domain_blocking merged with default_map and options[:domain_blocking_map]' do

View file

@ -18,7 +18,7 @@ RSpec.describe StatusRelationshipsPresenter do
let(:status_ids) { statuses.map(&:id) + statuses.map(&:reblog_of_id).compact }
let(:default_map) { { 1 => true } }
context 'options are not set' do
context 'when options are not set' do
let(:options) { {} }
it 'sets default maps' do
@ -30,7 +30,7 @@ RSpec.describe StatusRelationshipsPresenter do
end
end
context 'options[:reblogs_map] is set' do
context 'when options[:reblogs_map] is set' do
let(:options) { { reblogs_map: { 2 => true } } }
it 'sets @reblogs_map merged with default_map and options[:reblogs_map]' do
@ -38,7 +38,7 @@ RSpec.describe StatusRelationshipsPresenter do
end
end
context 'options[:favourites_map] is set' do
context 'when options[:favourites_map] is set' do
let(:options) { { favourites_map: { 3 => true } } }
it 'sets @favourites_map merged with default_map and options[:favourites_map]' do
@ -46,7 +46,7 @@ RSpec.describe StatusRelationshipsPresenter do
end
end
context 'options[:bookmarks_map] is set' do
context 'when options[:bookmarks_map] is set' do
let(:options) { { bookmarks_map: { 4 => true } } }
it 'sets @bookmarks_map merged with default_map and options[:bookmarks_map]' do
@ -54,7 +54,7 @@ RSpec.describe StatusRelationshipsPresenter do
end
end
context 'options[:mutes_map] is set' do
context 'when options[:mutes_map] is set' do
let(:options) { { mutes_map: { 5 => true } } }
it 'sets @mutes_map merged with default_map and options[:mutes_map]' do
@ -62,7 +62,7 @@ RSpec.describe StatusRelationshipsPresenter do
end
end
context 'options[:pins_map] is set' do
context 'when options[:pins_map] is set' do
let(:options) { { pins_map: { 6 => true } } }
it 'sets @pins_map merged with default_map and options[:pins_map]' do