Commit c78a643b authored by Rajendra Kadam's avatar Rajendra Kadam Committed by Peter Leitzen

Fix leaky constant in json serialization spec

parent d194f3dc
...@@ -380,7 +380,6 @@ RSpec/LeakyConstantDeclaration: ...@@ -380,7 +380,6 @@ RSpec/LeakyConstantDeclaration:
- 'spec/migrations/encrypt_plaintext_attributes_on_application_settings_spec.rb' - 'spec/migrations/encrypt_plaintext_attributes_on_application_settings_spec.rb'
- 'spec/models/clusters/cluster_spec.rb' - 'spec/models/clusters/cluster_spec.rb'
- 'spec/models/concerns/batch_destroy_dependent_associations_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_insert_safe_spec.rb'
- 'spec/models/concerns/bulk_insertable_associations_spec.rb' - 'spec/models/concerns/bulk_insertable_associations_spec.rb'
- 'spec/models/concerns/mentionable_spec.rb' - 'spec/models/concerns/mentionable_spec.rb'
......
---
title: Fix leaky constant issue in json serialization spec
merge_request: 32051
author: Rajendra Kadam
type: fixed
...@@ -3,8 +3,11 @@ ...@@ -3,8 +3,11 @@
require 'spec_helper' require 'spec_helper'
describe BlocksJsonSerialization do describe BlocksJsonSerialization do
DummyModel = Class.new do before do
include BlocksJsonSerialization stub_const('DummyModel', Class.new)
DummyModel.class_eval do
include BlocksJsonSerialization
end
end end
it 'blocks as_json' do 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