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 55describe Mongoid ::Fields ::FieldTypes do
66
77 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 )
99 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 )
1111 end
1212
1313 describe '.get' do
103103 expect ( described_class . get ( :integer ) ) . to eq String
104104 end
105105
106- it 'does not alter the DEFAULT_ALIASES constant' do
106+ it 'does not alter the DEFAULT_MAPPING constant' do
107107 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
109109 end
110110 end
111111
123123 expect ( described_class . get ( :integer ) ) . to eq nil
124124 end
125125
126- it 'does not alter the DEFAULT_ALIASES constant' do
126+ it 'does not alter the DEFAULT_MAPPING constant' do
127127 described_class . delete ( :integer )
128- expect ( described_class ::DEFAULT_ALIASES [ :integer ] ) . to eq Integer
128+ expect ( described_class ::DEFAULT_MAPPING [ :integer ] ) . to eq Integer
129129 end
130130 end
131131
132132 describe '.mapping' do
133133
134134 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
136136 end
137137
138138 it 'can add a type' do
Original file line number Diff line number Diff line change @@ -1938,9 +1938,9 @@ class DiscriminatorChild2 < DiscriminatorParent
19381938 context '.type method' do
19391939 around do |example |
19401940 klass = Mongoid ::Fields ::FieldTypes
1941- klass . instance_variable_set ( :@mapping , klass ::DEFAULT_ALIASES . dup )
1941+ klass . instance_variable_set ( :@mapping , klass ::DEFAULT_MAPPING . dup )
19421942 example . run
1943- klass . instance_variable_set ( :@mapping , klass ::DEFAULT_ALIASES . dup )
1943+ klass . instance_variable_set ( :@mapping , klass ::DEFAULT_MAPPING . dup )
19441944 end
19451945
19461946 it 'can define a custom type' do
@@ -1990,7 +1990,7 @@ def self.model_name
19901990
19911991 describe '::TYPE_MAPPINGS' do
19921992 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
19941994 end
19951995 end
19961996end
You can’t perform that action at this time.
0 commit comments