File tree Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Expand file tree Collapse file tree 2 files changed +10
-10
lines changed Original file line number Diff line number Diff line change 5
5
describe Mongoid ::Fields ::FieldTypes do
6
6
7
7
around do |example |
8
- described_class . instance_variable_set ( :@mapping , described_class ::DEFAULT_ALIASES . dup )
8
+ described_class . instance_variable_set ( :@mapping , described_class ::DEFAULT_MAPPING . dup )
9
9
example . run
10
- described_class . instance_variable_set ( :@mapping , described_class ::DEFAULT_ALIASES . dup )
10
+ described_class . instance_variable_set ( :@mapping , described_class ::DEFAULT_MAPPING . dup )
11
11
end
12
12
13
13
describe '.get' do
103
103
expect ( described_class . get ( :integer ) ) . to eq String
104
104
end
105
105
106
- it 'does not alter the DEFAULT_ALIASES constant' do
106
+ it 'does not alter the DEFAULT_MAPPING constant' do
107
107
described_class . define ( :integer , String )
108
- expect ( described_class ::DEFAULT_ALIASES [ :integer ] ) . to eq Integer
108
+ expect ( described_class ::DEFAULT_MAPPING [ :integer ] ) . to eq Integer
109
109
end
110
110
end
111
111
123
123
expect ( described_class . get ( :integer ) ) . to eq nil
124
124
end
125
125
126
- it 'does not alter the DEFAULT_ALIASES constant' do
126
+ it 'does not alter the DEFAULT_MAPPING constant' do
127
127
described_class . delete ( :integer )
128
- expect ( described_class ::DEFAULT_ALIASES [ :integer ] ) . to eq Integer
128
+ expect ( described_class ::DEFAULT_MAPPING [ :integer ] ) . to eq Integer
129
129
end
130
130
end
131
131
132
132
describe '.mapping' do
133
133
134
134
it 'returns the default mapping by default' do
135
- expect ( described_class . mapping ) . to eq described_class ::DEFAULT_ALIASES
135
+ expect ( described_class . mapping ) . to eq described_class ::DEFAULT_MAPPING
136
136
end
137
137
138
138
it 'can add a type' do
Original file line number Diff line number Diff line change @@ -1938,9 +1938,9 @@ class DiscriminatorChild2 < DiscriminatorParent
1938
1938
context '.type method' do
1939
1939
around do |example |
1940
1940
klass = Mongoid ::Fields ::FieldTypes
1941
- klass . instance_variable_set ( :@mapping , klass ::DEFAULT_ALIASES . dup )
1941
+ klass . instance_variable_set ( :@mapping , klass ::DEFAULT_MAPPING . dup )
1942
1942
example . run
1943
- klass . instance_variable_set ( :@mapping , klass ::DEFAULT_ALIASES . dup )
1943
+ klass . instance_variable_set ( :@mapping , klass ::DEFAULT_MAPPING . dup )
1944
1944
end
1945
1945
1946
1946
it 'can define a custom type' do
@@ -1990,7 +1990,7 @@ def self.model_name
1990
1990
1991
1991
describe '::TYPE_MAPPINGS' do
1992
1992
it 'returns the default mapping' do
1993
- expect ( described_class ::TYPE_MAPPINGS ) . to eq ::Mongoid ::Fields ::FieldTypes ::DEFAULT_ALIASES
1993
+ expect ( described_class ::TYPE_MAPPINGS ) . to eq ::Mongoid ::Fields ::FieldTypes ::DEFAULT_MAPPING
1994
1994
end
1995
1995
end
1996
1996
end
You can’t perform that action at this time.
0 commit comments