diff options
Diffstat (limited to 'spec/ruby/language/optional_assignments_spec.rb')
-rw-r--r-- | spec/ruby/language/optional_assignments_spec.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/spec/ruby/language/optional_assignments_spec.rb b/spec/ruby/language/optional_assignments_spec.rb index 91b580e084..2f50136ba9 100644 --- a/spec/ruby/language/optional_assignments_spec.rb +++ b/spec/ruby/language/optional_assignments_spec.rb @@ -252,7 +252,11 @@ describe 'Optional variable assignments' do end describe 'using compunded constants' do - before do + before :each do + Object.send(:remove_const, :A) if defined? Object::A + end + + after :each do Object.send(:remove_const, :A) if defined? Object::A end |