Skip to content
Snippets Groups Projects
Commit ddea1a34 authored by Arturo Herrero's avatar Arturo Herrero
Browse files

RSpec zero monkey patching mode

The plan for RSpec 4.0 is to disable monkey patching, reference:
https://rspec.info/blog/2013/07/the-plan-for-rspec-3/#zero-monkey-patching-mode
https://relishapp.com/rspec/rspec-core/docs/configuration/zero-monkey-patching-mode

This commit stops using RSpec monkey patching in several specs.
parent c7dc919c
No related branches found
No related tags found
No related merge requests found
Showing
with 20 additions and 20 deletions
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe ProtectableDropdown do
RSpec.describe ProtectableDropdown do
let(:project) { create(:project, :repository) }
let(:subject) { described_class.new(project, :branches) }
 
Loading
Loading
Loading
Loading
@@ -2,6 +2,6 @@
 
require 'spec_helper'
 
describe ProtectedBranch::MergeAccessLevel do
RSpec.describe ProtectedBranch::MergeAccessLevel do
it { is_expected.to validate_inclusion_of(:access_level).in_array([Gitlab::Access::MAINTAINER, Gitlab::Access::DEVELOPER, Gitlab::Access::NO_ACCESS]) }
end
Loading
Loading
@@ -2,6 +2,6 @@
 
require 'spec_helper'
 
describe ProtectedBranch::PushAccessLevel do
RSpec.describe ProtectedBranch::PushAccessLevel do
it { is_expected.to validate_inclusion_of(:access_level).in_array([Gitlab::Access::MAINTAINER, Gitlab::Access::DEVELOPER, Gitlab::Access::NO_ACCESS]) }
end
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe ProtectedBranch do
RSpec.describe ProtectedBranch do
subject { build_stubbed(:protected_branch) }
 
describe 'Associations' do
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe ProtectedTag do
RSpec.describe ProtectedTag do
describe 'Associations' do
it { is_expected.to belong_to(:project) }
end
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe PushEventPayload do
RSpec.describe PushEventPayload do
it_behaves_like 'having unique enum values'
 
describe 'saving payloads' do
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe PushEvent do
RSpec.describe PushEvent do
let(:payload) { PushEventPayload.new }
 
let(:event) do
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe ReadmeBlob do
RSpec.describe ReadmeBlob do
include FakeBlobHelpers
 
describe 'policy' do
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe RedirectRoute do
RSpec.describe RedirectRoute do
let(:group) { create(:group) }
let!(:redirect_route) { group.redirect_routes.create(path: 'gitlabb') }
 
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe Releases::Evidence do
RSpec.describe Releases::Evidence do
let_it_be(:project) { create(:project) }
let(:release) { create(:release, project: project) }
 
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe Releases::Link do
RSpec.describe Releases::Link do
let(:release) { create(:release, project: project) }
let(:project) { create(:project) }
 
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe Releases::Source do
RSpec.describe Releases::Source do
let_it_be(:project) { create(:project, :repository, name: 'finance-cal') }
let(:tag_name) { 'v1.0' }
 
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe RemoteMirror, :mailer do
RSpec.describe RemoteMirror, :mailer do
include GitHelpers
 
describe 'URL validation' do
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe RepositoryLanguage do
RSpec.describe RepositoryLanguage do
let(:repository_language) { build(:repository_language) }
 
describe 'associations' do
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe Repository do
RSpec.describe Repository do
include RepoHelpers
include GitHelpers
 
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe ResourceMilestoneEvent, type: :model do
RSpec.describe ResourceMilestoneEvent, type: :model do
it_behaves_like 'a resource event'
it_behaves_like 'a resource event for issues'
it_behaves_like 'a resource event for merge requests'
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe ResourceStateEvent, type: :model do
RSpec.describe ResourceStateEvent, type: :model do
subject { build(:resource_state_event, issue: issue) }
 
let(:issue) { create(:issue) }
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe Review do
RSpec.describe Review do
describe 'associations' do
it { is_expected.to belong_to(:author).class_name('User').with_foreign_key(:author_id).inverse_of(:reviews) }
it { is_expected.to belong_to(:merge_request).inverse_of(:reviews).touch(false) }
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe Route do
RSpec.describe Route do
let(:group) { create(:group, path: 'git_lab', name: 'git_lab') }
let(:route) { group.route }
 
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe SentNotification do
RSpec.describe SentNotification do
let_it_be(:user) { create(:user) }
let_it_be(:project) { create(:project) }
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment