File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 132132 Config . env_separator = '_'
133133 end
134134
135- it 'should load variables from the new prefix' do
135+ it 'should load environment variables which begin with the custom prefix' do
136136 ENV [ 'MY_CONFIG_KEY' ] = 'value'
137137
138138 expect ( config . key ) . to eq ( 'value' )
139139 end
140140
141- it 'should not load variables from the default prefix' do
141+ it 'should not load environment variables which begin with the default prefix' do
142142 ENV [ 'Settings_key' ] = 'value'
143143
144144 expect ( config . key ) . to eq ( nil )
145145 end
146146
147- it 'should skip ENV variable when partial prefix match ' do
147+ it 'should not load environment variables which partially begin with the custom prefix ' do
148148 ENV [ 'MY_CONFIGS_KEY' ] = 'value'
149149
150150 expect ( config . key ) . to eq ( nil )
151151 end
152152
153- it 'should load variables and correctly recognize the new separator' do
154- ENV [ 'MY_CONFIG_KEY' ] = 'value'
153+ it 'should recognize the custom separator' do
155154 ENV [ 'MY_CONFIG_KEY.WITH.DOT' ] = 'value'
156155 ENV [ 'MY_CONFIG_WORLD_COUNTRIES_EUROPE' ] = '0'
157156
158- expect ( config . key ) . to eq ( 'value' )
159157 expect ( config [ 'key.with.dot' ] ) . to eq ( 'value' )
160158 expect ( config . world . countries . europe ) . to eq ( 0 )
161159 end
162160
163- it 'should ignore variables wit default separator' do
161+ it 'should not recognize the default separator' do
164162 ENV [ 'MY_CONFIG.KEY' ] = 'value'
165163
166164 expect ( config . key ) . to eq ( nil )
You can’t perform that action at this time.
0 commit comments