2015-10-20 14:54:02 +00:00
|
|
|
RSpec.shared_context 'Msf::DBManager' do
|
2013-09-30 18:47:53 +00:00
|
|
|
include_context 'Msf::Simple::Framework'
|
2013-04-20 21:44:42 +00:00
|
|
|
|
2013-09-30 18:47:53 +00:00
|
|
|
let(:active) do
|
|
|
|
true
|
|
|
|
end
|
2013-04-25 14:46:53 +00:00
|
|
|
|
2013-09-30 18:47:53 +00:00
|
|
|
let(:db_manager) do
|
|
|
|
framework.db
|
|
|
|
end
|
2013-04-20 21:44:42 +00:00
|
|
|
|
2015-12-31 22:56:13 +00:00
|
|
|
before(:example) do
|
2014-05-12 20:03:51 +00:00
|
|
|
# already connected due to use_transactional_fixtures, but need some of the side-effects of #connect
|
|
|
|
framework.db.workspace = framework.db.default_workspace
|
2015-10-20 20:52:30 +00:00
|
|
|
allow(db_manager).to receive(:active).and_return(active)
|
2013-09-30 18:47:53 +00:00
|
|
|
end
|
2014-08-26 20:24:08 +00:00
|
|
|
end
|