Files
metasploit-gs/spec/support/shared/contexts/msf/db_manager.rb
T
David Maloney c6656e4031 example_group and hook_scope conversions
not strictly required, these conversions keep us
up to date with latest rspec conventions and best practices
which will prevent use from having to convert them when they become
deprecated later
2015-12-31 16:56:13 -06:00

18 lines
423 B
Ruby

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