Commit 33a92272 authored by Rajendra Kadam's avatar Rajendra Kadam Committed by Rémy Coutable

Fix RSpec/ItBehavesLike cop

parent 887642fd
...@@ -252,15 +252,6 @@ RSpec/ExpectChange: ...@@ -252,15 +252,6 @@ RSpec/ExpectChange:
RSpec/ExpectInHook: RSpec/ExpectInHook:
Enabled: false Enabled: false
# Offense count: 9
# Cop supports --auto-correct.
# Configuration parameters: EnforcedStyle.
# SupportedStyles: it_behaves_like, it_should_behave_like
RSpec/ItBehavesLike:
Exclude:
- 'spec/lib/gitlab/git/commit_spec.rb'
- 'spec/services/notification_service_spec.rb'
# Offense count: 68 # Offense count: 68
# Cop supports --auto-correct. # Cop supports --auto-correct.
RSpec/LetBeforeExamples: RSpec/LetBeforeExamples:
......
---
title: Fix RSpec/ItBehavesLike cop
merge_request: 41111
author: Rajendra Kadam
type: fixed
...@@ -192,7 +192,7 @@ RSpec.describe Gitlab::Git::Commit, :seed_helper do ...@@ -192,7 +192,7 @@ RSpec.describe Gitlab::Git::Commit, :seed_helper do
end end
describe '.find with Gitaly enabled' do describe '.find with Gitaly enabled' do
it_should_behave_like '.find' it_behaves_like '.find'
end end
describe '.find with Rugged enabled', :enable_rugged do describe '.find with Rugged enabled', :enable_rugged do
...@@ -204,7 +204,7 @@ RSpec.describe Gitlab::Git::Commit, :seed_helper do ...@@ -204,7 +204,7 @@ RSpec.describe Gitlab::Git::Commit, :seed_helper do
described_class.find(repository, SeedRepo::Commit::ID) described_class.find(repository, SeedRepo::Commit::ID)
end end
it_should_behave_like '.find' it_behaves_like '.find'
end end
describe '.last_for_path' do describe '.last_for_path' do
...@@ -474,7 +474,7 @@ RSpec.describe Gitlab::Git::Commit, :seed_helper do ...@@ -474,7 +474,7 @@ RSpec.describe Gitlab::Git::Commit, :seed_helper do
end end
describe '.batch_by_oid with Gitaly enabled' do describe '.batch_by_oid with Gitaly enabled' do
it_should_behave_like '.batch_by_oid' it_behaves_like '.batch_by_oid'
context 'when oids is empty' do context 'when oids is empty' do
it 'makes no Gitaly request' do it 'makes no Gitaly request' do
...@@ -486,7 +486,7 @@ RSpec.describe Gitlab::Git::Commit, :seed_helper do ...@@ -486,7 +486,7 @@ RSpec.describe Gitlab::Git::Commit, :seed_helper do
end end
describe '.batch_by_oid with Rugged enabled', :enable_rugged do describe '.batch_by_oid with Rugged enabled', :enable_rugged do
it_should_behave_like '.batch_by_oid' it_behaves_like '.batch_by_oid'
it 'calls out to the Rugged implementation' do it 'calls out to the Rugged implementation' do
allow_next_instance_of(Rugged) do |instance| allow_next_instance_of(Rugged) do |instance|
......
...@@ -151,9 +151,9 @@ RSpec.describe NotificationService, :mailer do ...@@ -151,9 +151,9 @@ RSpec.describe NotificationService, :mailer do
end end
shared_examples_for 'participating notifications' do shared_examples_for 'participating notifications' do
it_should_behave_like 'participating by note notification' it_behaves_like 'participating by note notification'
it_should_behave_like 'participating by author notification' it_behaves_like 'participating by author notification'
it_should_behave_like 'participating by assignee notification' it_behaves_like 'participating by assignee notification'
end end
describe '#async' do describe '#async' do
...@@ -1682,13 +1682,13 @@ RSpec.describe NotificationService, :mailer do ...@@ -1682,13 +1682,13 @@ RSpec.describe NotificationService, :mailer do
end end
context 'participating' do context 'participating' do
it_should_behave_like 'participating by assignee notification' do it_behaves_like 'participating by assignee notification' do
let(:participant) { create(:user, username: 'user-participant')} let(:participant) { create(:user, username: 'user-participant')}
let(:issuable) { merge_request } let(:issuable) { merge_request }
let(:notification_trigger) { notification.new_merge_request(merge_request, @u_disabled) } let(:notification_trigger) { notification.new_merge_request(merge_request, @u_disabled) }
end end
it_should_behave_like 'participating by note notification' do it_behaves_like 'participating by note notification' do
let(:participant) { create(:user, username: 'user-participant')} let(:participant) { create(:user, username: 'user-participant')}
let(:issuable) { merge_request } let(:issuable) { merge_request }
let(:notification_trigger) { notification.new_merge_request(merge_request, @u_disabled) } let(:notification_trigger) { notification.new_merge_request(merge_request, @u_disabled) }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment