Skip to content
Snippets Groups Projects
Commit 8722fb64 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 DesignManagement::GenerateImageVersionsService do
RSpec.describe DesignManagement::GenerateImageVersionsService do
let_it_be(:project) { create(:project) }
let_it_be(:issue) { create(:issue, project: project) }
let_it_be(:version) { create(:design, :with_lfs_file, issue: issue).versions.first }
Loading
Loading
# frozen_string_literal: true
require 'spec_helper'
 
describe DesignManagement::SaveDesignsService do
RSpec.describe DesignManagement::SaveDesignsService do
include DesignManagementTestHelpers
include ConcurrentHelpers
 
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe Discussions::CaptureDiffNotePositionService do
RSpec.describe Discussions::CaptureDiffNotePositionService do
subject { described_class.new(note.noteable, paths) }
 
context 'image note on diff' do
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe Discussions::CaptureDiffNotePositionsService do
RSpec.describe Discussions::CaptureDiffNotePositionsService do
context 'when merge request has a discussion' do
let(:source_branch) { 'compare-with-merge-head-source' }
let(:target_branch) { 'compare-with-merge-head-target' }
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe Discussions::ResolveService do
RSpec.describe Discussions::ResolveService do
describe '#execute' do
let_it_be(:project) { create(:project, :repository) }
let_it_be(:user) { create(:user, developer_projects: [project]) }
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe Discussions::UpdateDiffPositionService do
RSpec.describe Discussions::UpdateDiffPositionService do
let(:project) { create(:project, :repository) }
let(:current_user) { project.owner }
let(:create_commit) { project.commit("913c66a37b4a45b9769037c55c2d238bd0942d2e") }
Loading
Loading
# frozen_string_literal: true
require 'spec_helper'
 
describe DraftNotes::CreateService do
RSpec.describe DraftNotes::CreateService do
let(:merge_request) { create(:merge_request) }
let(:project) { merge_request.target_project }
let(:user) { merge_request.author }
Loading
Loading
# frozen_string_literal: true
require 'spec_helper'
 
describe DraftNotes::DestroyService do
RSpec.describe DraftNotes::DestroyService do
let(:merge_request) { create(:merge_request) }
let(:project) { merge_request.target_project }
let(:user) { merge_request.author }
Loading
Loading
# frozen_string_literal: true
require 'spec_helper'
 
describe DraftNotes::PublishService do
RSpec.describe DraftNotes::PublishService do
include RepoHelpers
 
let(:merge_request) { create(:merge_request) }
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe Emails::ConfirmService do
RSpec.describe Emails::ConfirmService do
let(:user) { create(:user) }
 
subject(:service) { described_class.new(user) }
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe Emails::CreateService do
RSpec.describe Emails::CreateService do
let(:user) { create(:user) }
let(:opts) { { email: 'new@email.com', user: user } }
 
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe Emails::DestroyService do
RSpec.describe Emails::DestroyService do
let!(:user) { create(:user) }
let!(:email) { create(:email, user: user) }
 
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe Environments::AutoStopService, :clean_gitlab_redis_shared_state do
RSpec.describe Environments::AutoStopService, :clean_gitlab_redis_shared_state do
include CreateEnvironmentsHelpers
include ExclusiveLeaseHelpers
 
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe Environments::ResetAutoStopService do
RSpec.describe Environments::ResetAutoStopService do
let_it_be(:project) { create(:project) }
let_it_be(:developer) { create(:user).tap { |user| project.add_developer(user) } }
let_it_be(:reporter) { create(:user).tap { |user| project.add_reporter(user) } }
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe ErrorTracking::BaseService do
RSpec.describe ErrorTracking::BaseService do
describe '#compose_response' do
let(:project) { double('project') }
let(:user) { double('user') }
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe ErrorTracking::IssueDetailsService do
RSpec.describe ErrorTracking::IssueDetailsService do
include_context 'sentry error tracking context'
 
subject { described_class.new(project, user, params) }
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe ErrorTracking::IssueLatestEventService do
RSpec.describe ErrorTracking::IssueLatestEventService do
include_context 'sentry error tracking context'
 
subject { described_class.new(project, user) }
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe ErrorTracking::IssueUpdateService do
RSpec.describe ErrorTracking::IssueUpdateService do
include_context 'sentry error tracking context'
 
let(:arguments) { { issue_id: non_existing_record_id, status: 'resolved' } }
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe ErrorTracking::ListIssuesService do
RSpec.describe ErrorTracking::ListIssuesService do
include_context 'sentry error tracking context'
 
let(:params) { { search_term: 'something', sort: 'last_seen', cursor: 'some-cursor' } }
Loading
Loading
Loading
Loading
@@ -2,7 +2,7 @@
 
require 'spec_helper'
 
describe ErrorTracking::ListProjectsService do
RSpec.describe ErrorTracking::ListProjectsService do
let_it_be(:user) { create(:user) }
let_it_be(:project, reload: true) { 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