3370465d84
MSP-9606 In order to support Metasploit::Credential correctly, metasploit-framework needs to support Metasploit::Concern, which does all its magic using a Rails::Engine initializer, so the easiest path is to make metasploit-framework be able to use Rails::Engines. To make Rails::Engine use Rails::Engine, make a dummy Rails::Application subclass so that all the initializers will be run when anything requires msfenv.
17 lines
391 B
Ruby
17 lines
391 B
Ruby
shared_context 'Msf::DBManager' do
|
|
include_context 'Msf::Simple::Framework'
|
|
|
|
let(:active) do
|
|
true
|
|
end
|
|
|
|
let(:db_manager) do
|
|
framework.db
|
|
end
|
|
|
|
before(:each) do
|
|
# already connected due to use_transactional_fixtures, but need some of the side-effects of #connect
|
|
framework.db.workspace = framework.db.default_workspace
|
|
db_manager.stub(:active => active)
|
|
end
|
|
end |