diff --git a/spec/workers_spec.rb b/spec/workers_spec.rb index 6af0ddb..9f17947 100644 --- a/spec/workers_spec.rb +++ b/spec/workers_spec.rb @@ -203,7 +203,13 @@ let(:fixtures_dir) { File.join(__dir__,'fixtures') } let(:path) { File.join(fixtures_dir,'test_worker.rb') } - before { subject.load_file(path) } + before do + # NOTE: remote the test_worker class so that it gets reloaded. + Ronin::Recon.registry.delete('test_worker') + $LOADED_FEATURES.delete(path) + + subject.load_file(path) + end it "must load the file and add the worker to the workers" do expect(defined?(Ronin::Recon::TestWorker)).to be_truthy