|
176 | 176 | expect(logger_output).to be_blank |
177 | 177 | end |
178 | 178 |
|
179 | | - it 'writes to logger when a key is overridden that is not blacklisted' do |
| 179 | + it 'writes to logger when a key is overridden that is not ignored' do |
180 | 180 | mash_class = Class.new(Hashie::Mash) do |
181 | 181 | disable_warnings :merge |
182 | 182 | end |
|
185 | 185 | expect(logger_output).not_to be_blank |
186 | 186 | end |
187 | 187 |
|
188 | | - it 'does not write to logger when a key is overridden that is blacklisted' do |
| 188 | + it 'does not write to logger when a key is overridden that is ignored' do |
189 | 189 | mash_class = Class.new(Hashie::Mash) do |
190 | 190 | disable_warnings :zip |
191 | 191 | end |
|
194 | 194 | expect(logger_output).to be_blank |
195 | 195 | end |
196 | 196 |
|
197 | | - it 'carries over the disabled blacklist for warnings on grandchild classes' do |
| 197 | + it 'carries over the ignored warnings list for warnings on grandchild classes' do |
198 | 198 | child_class = Class.new(Hashie::Mash) do |
199 | 199 | disable_warnings :zip, :merge |
200 | 200 | end |
|
208 | 208 |
|
209 | 209 | context 'multiple disable_warnings calls' do |
210 | 210 | context 'calling disable_warnings multiple times with parameters' do |
211 | | - it 'appends each new parameter to the blacklist' do |
| 211 | + it 'appends each new parameter to the ignore list' do |
212 | 212 | child_class = Class.new(Hashie::Mash) do |
213 | 213 | disable_warnings :zip |
214 | 214 | disable_warnings :merge |
|
220 | 220 | end |
221 | 221 |
|
222 | 222 | context 'calling disable_warnings without keys after calling with keys' do |
223 | | - it 'uses the last call to ignore the blacklist' do |
| 223 | + it 'uses the last call to determine the ignore list' do |
224 | 224 | child_class = Class.new(Hashie::Mash) do |
225 | 225 | disable_warnings :zip |
226 | 226 | disable_warnings |
|
234 | 234 | end |
235 | 235 |
|
236 | 236 | context 'calling disable_parameters with keys after calling without keys' do |
237 | | - it 'only ignores logging for the blacklisted methods' do |
| 237 | + it 'only ignores logging for ignored methods' do |
238 | 238 | child_class = Class.new(Hashie::Mash) do |
239 | 239 | disable_warnings |
240 | 240 | disable_warnings :zip |
@@ -795,30 +795,30 @@ class SubMash < Hashie::Mash |
795 | 795 | end |
796 | 796 |
|
797 | 797 | context 'when the file has symbols' do |
798 | | - it 'can override the value of whitelist_classes' do |
799 | | - mash = Hashie::Mash.load('spec/fixtures/yaml_with_symbols.yml', whitelist_classes: [Symbol]) |
| 798 | + it 'can override the value of permitted_classes' do |
| 799 | + mash = Hashie::Mash.load('spec/fixtures/yaml_with_symbols.yml', permitted_classes: [Symbol]) |
800 | 800 | expect(mash.user_icon.width).to eq(200) |
801 | 801 | end |
802 | | - it 'uses defaults for whitelist_classes' do |
| 802 | + it 'uses defaults for permitted_classes' do |
803 | 803 | expect do |
804 | 804 | Hashie::Mash.load('spec/fixtures/yaml_with_symbols.yml') |
805 | 805 | end.to raise_error Psych::DisallowedClass, /Symbol/ |
806 | 806 | end |
807 | | - it 'can override the value of whitelist_symbols' do |
| 807 | + it 'can override the value of permitted_symbols' do |
808 | 808 | mash = Hashie::Mash.load('spec/fixtures/yaml_with_symbols.yml', |
809 | | - whitelist_classes: [Symbol], |
810 | | - whitelist_symbols: %i[ |
| 809 | + permitted_classes: [Symbol], |
| 810 | + permitted_symbols: %i[ |
811 | 811 | user_icon |
812 | 812 | width |
813 | 813 | height |
814 | 814 | ]) |
815 | 815 | expect(mash.user_icon.width).to eq(200) |
816 | 816 | end |
817 | | - it 'raises an error on insufficient whitelist_symbols' do |
| 817 | + it 'raises an error on insufficient permitted_symbols' do |
818 | 818 | expect do |
819 | 819 | Hashie::Mash.load('spec/fixtures/yaml_with_symbols.yml', |
820 | | - whitelist_classes: [Symbol], |
821 | | - whitelist_symbols: %i[ |
| 820 | + permitted_classes: [Symbol], |
| 821 | + permitted_symbols: %i[ |
822 | 822 | user_icon |
823 | 823 | width |
824 | 824 | ]) |
|
0 commit comments