Files
metasploit-gs/spec/support/shared/contexts/msf/simple/framework.rb
T
Luke Imhoff fc9ca84da5 shared_context -> RSpec.shared_context
MSP-13484

shared_context must be qualified as global patching is disabled in
spec_helper.
2015-12-10 21:47:22 -06:00

30 lines
678 B
Ruby

# -*- coding:binary -*-
require 'msf/base/simple/framework'
require 'metasploit/framework'
RSpec.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