Skip to content

Commit ae79f02

Browse files
committed
Fix around blocks
1 parent a604c64 commit ae79f02

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

spec/mongoid/fields/field_types_spec.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,9 @@
55
describe Mongoid::Fields::FieldTypes do
66

77
around do |example|
8-
mapping = described_class::DEFAULT_MAPPING.dup
9-
described_class.instance_variable_set(:@mapping, mapping)
8+
described_class.instance_variable_set(:@mapping, described_class::DEFAULT_MAPPING.dup)
109
example.run
11-
described_class.instance_variable_set(:@mapping, mapping)
10+
described_class.instance_variable_set(:@mapping, described_class::DEFAULT_MAPPING.dup)
1211
end
1312

1413
describe '.get' do

spec/mongoid/fields_spec.rb

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1789,10 +1789,9 @@ class DiscriminatorChild2 < DiscriminatorParent
17891789
context '.type method' do
17901790
around do |example|
17911791
klass = Mongoid::Fields::FieldTypes
1792-
mapping = klass::DEFAULT_MAPPING.dup
1793-
klass.instance_variable_set(:@mapping, mapping)
1792+
klass.instance_variable_set(:@mapping, klass::DEFAULT_MAPPING.dup)
17941793
example.run
1795-
klass.instance_variable_set(:@mapping, mapping)
1794+
klass.instance_variable_set(:@mapping, klass::DEFAULT_MAPPING.dup)
17961795
end
17971796

17981797
it 'can define a custom type' do

0 commit comments

Comments
 (0)