Files
metasploit-gs/spec/support/shared/contexts/msf/simple/framework.rb
T
Luke Imhoff 8925db2ec1 Remove thread cleaner from Msf::Simple::Framework shared context
MSP-11605

The `framework` from 'Msf::Simple::Framework' shared context is not
guaranteed to make threads with `framework.threads` anymore, so the
cleaner shouldn't allows be present in 'Msf::Simple::Framework'.
2014-11-14 09:14:13 -06:00

30 lines
672 B
Ruby

# -*- coding:binary -*-
require 'msf/base/simple/framework'
require 'metasploit/framework'
shared_context 'Msf::Simple::Framework' do
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