Skip to content

Commit

Permalink
Added a fix to "unload" the test_worker class so that it gets reloa…
Browse files Browse the repository at this point in the history
…ded.
  • Loading branch information
postmodern committed Jun 4, 2024
1 parent 5449d3f commit 11685cd
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion spec/workers_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 11685cd

Please sign in to comment.