Commit 10e83d14 authored by Rajendra Kadam's avatar Rajendra Kadam Committed by Peter Leitzen

Fix leaky constant in factory spec

parent 9ab9113e
......@@ -370,7 +370,6 @@ RSpec/LeakyConstantDeclaration:
- 'spec/lib/gitlab/quick_actions/dsl_spec.rb'
- 'spec/lib/gitlab/sidekiq_middleware/client_metrics_spec.rb'
- 'spec/lib/gitlab/sidekiq_middleware/server_metrics_spec.rb'
- 'spec/lib/gitlab/view/presenter/factory_spec.rb'
- 'spec/lib/marginalia_spec.rb'
- 'spec/mailers/notify_spec.rb'
- 'spec/migrations/20191125114345_add_admin_mode_protected_path_spec.rb'
......
---
title: Fix leaky constant issue in factory spec
merge_request: 32099
author: Rajendra Kadam
type: fixed
......@@ -31,11 +31,11 @@ describe Gitlab::View::Presenter::Factory do
end
it 'uses the presenter_class if given on #initialize' do
MyCustomPresenter = Class.new(described_class)
my_custom_presenter = Class.new(described_class)
presenter = described_class.new(build, presenter_class: MyCustomPresenter).fabricate!
presenter = described_class.new(build, presenter_class: my_custom_presenter).fabricate!
expect(presenter).to be_a(MyCustomPresenter)
expect(presenter).to be_a(my_custom_presenter)
end
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