Commit 4a067f44 authored by Rajendra Kadam's avatar Rajendra Kadam Committed by Peter Leitzen

Stub class in resolve discussion spec

parent 1d35e510
...@@ -395,7 +395,6 @@ RSpec/LeakyConstantDeclaration: ...@@ -395,7 +395,6 @@ RSpec/LeakyConstantDeclaration:
- 'spec/serializers/commit_entity_spec.rb' - 'spec/serializers/commit_entity_spec.rb'
- 'spec/services/clusters/applications/check_installation_progress_service_spec.rb' - 'spec/services/clusters/applications/check_installation_progress_service_spec.rb'
- 'spec/services/clusters/applications/check_uninstall_progress_service_spec.rb' - 'spec/services/clusters/applications/check_uninstall_progress_service_spec.rb'
- 'spec/services/issues/resolve_discussions_spec.rb'
- 'spec/support/shared_contexts/spam_constants.rb' - 'spec/support/shared_contexts/spam_constants.rb'
- 'spec/support/shared_examples/quick_actions/issuable/issuable_quick_actions_shared_examples.rb' - 'spec/support/shared_examples/quick_actions/issuable/issuable_quick_actions_shared_examples.rb'
- 'spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb' - 'spec/support_specs/matchers/exceed_query_limit_helpers_spec.rb'
......
---
title: Stub class constant in resolve discussion spec
merge_request: 31965
author: Rajendra Kadam
type: fixed
...@@ -3,7 +3,12 @@ ...@@ -3,7 +3,12 @@
require 'spec_helper.rb' require 'spec_helper.rb'
describe Issues::ResolveDiscussions do describe Issues::ResolveDiscussions do
class DummyService < Issues::BaseService let(:project) { create(:project, :repository) }
let(:user) { create(:user) }
before do
stub_const('DummyService', Class.new(Issues::BaseService))
DummyService.class_eval do
include ::Issues::ResolveDiscussions include ::Issues::ResolveDiscussions
def initialize(*args) def initialize(*args)
...@@ -12,10 +17,6 @@ describe Issues::ResolveDiscussions do ...@@ -12,10 +17,6 @@ describe Issues::ResolveDiscussions do
end end
end end
let(:project) { create(:project, :repository) }
let(:user) { create(:user) }
before do
project.add_developer(user) project.add_developer(user)
end end
......
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