Files
metasploit-gs/spec/support/shared/contexts/msf/simple/framework.rb
T

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

29 lines
658 B
Ruby
Raw Normal View History

# -*- coding:binary -*-
2013-04-01 16:06:40 -05:00
require 'metasploit/framework'
2015-10-20 09:54:02 -05:00
RSpec.shared_context 'Msf::Simple::Framework' do
2013-09-30 13:47:53 -05:00
let(:dummy_pathname) do
2014-06-05 12:40:24 -05:00
Rails.root.join('spec', 'dummy')
2013-09-30 13:47:53 -05:00
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
2015-12-31 16:56:13 -06:00
before(:example) do
2013-09-30 13:47:53 -05:00
framework_config_pathname.mkpath
end
2015-12-31 16:56:13 -06:00
after(:example) do
2022-03-23 13:05:42 +00:00
FileUtils.rm_rf(dummy_pathname)
2013-09-30 13:47:53 -05:00
end
2013-04-01 16:06:40 -05:00
end