test/support/reloadable.rb in canard-0.5.0.pre vs test/support/reloadable.rb in canard-0.6.0.pre

- old
+ new

@@ -1,22 +1,21 @@ +# frozen_string_literal: true + module MiniTest class Unit class TestCase - - def teardown - Object.send(:remove_const, 'Canard') if Object.const_defined?('Canard') - GC.start - end - - def setup - [ 'canard/abilities.rb', - 'canard/user_model.rb', - "canard/find_abilities.rb" - ].each do |file| - file_path = File.join(File.expand_path('../../../lib', __FILE__), file) - load file_path + def teardown + Object.send(:remove_const, 'Canard') if Object.const_defined?('Canard') + GC.start end - end - end + def setup + ['canard/abilities.rb', + 'canard/user_model.rb', + 'canard/find_abilities.rb'].each do |file| + file_path = File.join(File.expand_path('../../lib', __dir__), file) + load file_path + end + end + end end end