Commit 8b47237c authored by Peter Leitzen's avatar Peter Leitzen

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

Fix leaky constant in json serialization spec

See merge request gitlab-org/gitlab!32051
parents 957fde1a c78a643b
......@@ -380,7 +380,6 @@ RSpec/LeakyConstantDeclaration:
- 'spec/migrations/encrypt_plaintext_attributes_on_application_settings_spec.rb'
- 'spec/models/clusters/cluster_spec.rb'
- 'spec/models/concerns/batch_destroy_dependent_associations_spec.rb'
- 'spec/models/concerns/blocks_json_serialization_spec.rb'
- 'spec/models/concerns/bulk_insert_safe_spec.rb'
- 'spec/models/concerns/bulk_insertable_associations_spec.rb'
- 'spec/models/concerns/triggerable_hooks_spec.rb'
......
---
title: Fix leaky constant issue in json serialization spec
merge_request: 32051
author: Rajendra Kadam
type: fixed
......@@ -3,8 +3,11 @@
require 'spec_helper'
describe BlocksJsonSerialization do
DummyModel = Class.new do
include BlocksJsonSerialization
before do
stub_const('DummyModel', Class.new)
DummyModel.class_eval do
include BlocksJsonSerialization
end
end
it 'blocks as_json' do
......
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