Commit 7d718303 authored by Peter Leitzen's avatar Peter Leitzen

Merge branch 'leaky-constant-fix-26' into 'master'

Fix leaky constant in factory spec

See merge request gitlab-org/gitlab!32099
parents e9d10ce7 10e83d14
......@@ -367,7 +367,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