Autofix Rubocop RSpec/ReturnFromStub (#23724)
This commit is contained in:
parent
21bf326356
commit
a2fdb388eb
7 changed files with 6 additions and 19 deletions
|
@ -1923,19 +1923,6 @@ RSpec/RepeatedExampleGroupDescription:
|
||||||
- 'spec/controllers/admin/reports/actions_controller_spec.rb'
|
- 'spec/controllers/admin/reports/actions_controller_spec.rb'
|
||||||
- 'spec/policies/report_note_policy_spec.rb'
|
- 'spec/policies/report_note_policy_spec.rb'
|
||||||
|
|
||||||
# Offense count: 6
|
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
|
||||||
# Configuration parameters: EnforcedStyle.
|
|
||||||
# SupportedStyles: and_return, block
|
|
||||||
RSpec/ReturnFromStub:
|
|
||||||
Exclude:
|
|
||||||
- 'spec/controllers/api/v1/accounts/credentials_controller_spec.rb'
|
|
||||||
- 'spec/controllers/api/v1/apps/credentials_controller_spec.rb'
|
|
||||||
- 'spec/controllers/api/v1/statuses/favourited_by_accounts_controller_spec.rb'
|
|
||||||
- 'spec/controllers/api/v1/statuses/reblogged_by_accounts_controller_spec.rb'
|
|
||||||
- 'spec/controllers/api/v1/statuses_controller_spec.rb'
|
|
||||||
- 'spec/validators/blacklisted_email_validator_spec.rb'
|
|
||||||
|
|
||||||
# Offense count: 18
|
# Offense count: 18
|
||||||
# This cop supports safe autocorrection (--autocorrect).
|
# This cop supports safe autocorrection (--autocorrect).
|
||||||
RSpec/ScatteredLet:
|
RSpec/ScatteredLet:
|
||||||
|
|
|
@ -86,7 +86,7 @@ describe Api::V1::Accounts::CredentialsController do
|
||||||
|
|
||||||
context 'without an oauth token' do
|
context 'without an oauth token' do
|
||||||
before do
|
before do
|
||||||
allow(controller).to receive(:doorkeeper_token) { nil }
|
allow(controller).to receive(:doorkeeper_token).and_return(nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'GET #show' do
|
describe 'GET #show' do
|
||||||
|
|
|
@ -30,7 +30,7 @@ describe Api::V1::Apps::CredentialsController do
|
||||||
|
|
||||||
context 'without an oauth token' do
|
context 'without an oauth token' do
|
||||||
before do
|
before do
|
||||||
allow(controller).to receive(:doorkeeper_token) { nil }
|
allow(controller).to receive(:doorkeeper_token).and_return(nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
describe 'GET #show' do
|
describe 'GET #show' do
|
||||||
|
|
|
@ -45,7 +45,7 @@ RSpec.describe Api::V1::Statuses::FavouritedByAccountsController, type: :control
|
||||||
|
|
||||||
context 'without an oauth token' do
|
context 'without an oauth token' do
|
||||||
before do
|
before do
|
||||||
allow(controller).to receive(:doorkeeper_token) { nil }
|
allow(controller).to receive(:doorkeeper_token).and_return(nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with a private status' do
|
context 'with a private status' do
|
||||||
|
|
|
@ -45,7 +45,7 @@ RSpec.describe Api::V1::Statuses::RebloggedByAccountsController, type: :controll
|
||||||
|
|
||||||
context 'without an oauth token' do
|
context 'without an oauth token' do
|
||||||
before do
|
before do
|
||||||
allow(controller).to receive(:doorkeeper_token) { nil }
|
allow(controller).to receive(:doorkeeper_token).and_return(nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with a private status' do
|
context 'with a private status' do
|
||||||
|
|
|
@ -219,7 +219,7 @@ RSpec.describe Api::V1::StatusesController, type: :controller do
|
||||||
|
|
||||||
context 'without an oauth token' do
|
context 'without an oauth token' do
|
||||||
before do
|
before do
|
||||||
allow(controller).to receive(:doorkeeper_token) { nil }
|
allow(controller).to receive(:doorkeeper_token).and_return(nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
context 'with a private status' do
|
context 'with a private status' do
|
||||||
|
|
|
@ -8,7 +8,7 @@ RSpec.describe BlacklistedEmailValidator, type: :validator do
|
||||||
let(:errors) { double(add: nil) }
|
let(:errors) { double(add: nil) }
|
||||||
|
|
||||||
before do
|
before do
|
||||||
allow(user).to receive(:valid_invitation?) { false }
|
allow(user).to receive(:valid_invitation?).and_return(false)
|
||||||
allow_any_instance_of(described_class).to receive(:blocked_email_provider?) { blocked_email }
|
allow_any_instance_of(described_class).to receive(:blocked_email_provider?) { blocked_email }
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue