Files
metasploit-gs/spec/support/shared/contexts/msf/simple/framework.rb
T
Luke Imhoff eede74be1e Extract 'Msf::Framework#threads cleaner'
MSP-11147

Extract from 'Msf::Simple::Framework' the `after(:each)` that kills and joins
threads from `framework.threads` into 'Msf::Framework#threads cleaner`.
2014-11-11 11:49:48 -06:00

32 lines
724 B
Ruby

# -*- coding:binary -*-
require 'msf/base/simple/framework'
require 'metasploit/framework'
shared_context 'Msf::Simple::Framework' do
include_context 'Msf::Framework#threads cleaner'
let(:dummy_pathname) do
Rails.root.join('spec', 'dummy')
end
let(:framework) do
Msf::Simple::Framework.create(
'ConfigDirectory' => framework_config_pathname.to_s,
# don't load any module paths so we can just load the module under test and save time
'DeferModuleLoads' => true
)
end
let(:framework_config_pathname) do
dummy_pathname.join('framework', 'config')
end
before(:each) do
framework_config_pathname.mkpath
end
after(:each) do
dummy_pathname.rmtree
end
end