Files
metasploit-gs/spec/support/shared/contexts/msf/db_manager.rb
T
2018-01-19 15:16:19 -06:00

18 lines
436 B
Ruby

RSpec.shared_context 'Msf::DBManager' do
include_context 'Msf::Simple::Framework'
let(:active) do
true
end
let(:db_manager) do
framework.db.get_data_service
end
before(:example) do
# already connected due to use_transactional_fixtures, but need some of the side-effects of #connect
db_manager.workspace = db_manager.default_workspace
allow(db_manager).to receive(:active).and_return(active)
end
end