Spec methods from db_manager.rb

MSP-11466
bug/bundler_fix
Luke Imhoff 2014-10-07 15:49:42 -05:00
parent c09335985b
commit 6a54f0ac4c
No known key found for this signature in database
GPG Key ID: 5B1FB01FB33356F8
1 changed files with 39 additions and 0 deletions

View File

@ -21,6 +21,18 @@ describe Msf::DBManager do
it_should_behave_like 'Msf::DBManager::Migration'
it_should_behave_like 'Msf::DBManager::ImportMsfXml'
context 'CONSTANTS' do
context 'ADAPTER' do
subject(:adapter) {
described_class::ADAPTER
}
it { is_expected.to eq('postgresql') }
end
end
it { is_expected.to respond_to :active }
context '#add_rails_engine_migration_paths' do
def add_rails_engine_migration_paths
db_manager.add_rails_engine_migration_paths
@ -39,6 +51,23 @@ describe Msf::DBManager do
end
end
it { is_expected.to respond_to :after_establish_connection }
it { is_expected.to respond_to :connect }
it { is_expected.to respond_to :connection_established? }
it { is_expected.to respond_to :create_db }
it { is_expected.to respond_to :disconnect }
it { is_expected.to respond_to :driver }
it { is_expected.to respond_to :drivers }
it { is_expected.to respond_to :drivers= }
it { is_expected.to respond_to :error }
it { is_expected.to respond_to :initialize_adapter }
it { is_expected.to respond_to :initialize_database_support }
it { is_expected.to respond_to :initialize_sink }
it { is_expected.to respond_to :modules_cached }
it { is_expected.to respond_to :modules_cached= }
it { is_expected.to respond_to :modules_cached }
it { is_expected.to respond_to :modules_cached= }
context '#purge_all_module_details' do
def purge_all_module_details
db_manager.purge_all_module_details
@ -106,6 +135,8 @@ describe Msf::DBManager do
end
end
it { is_expected.to respond_to :queue }
context '#remove_module_details' do
def remove_module_details
db_manager.remove_module_details(mtype, refname)
@ -1217,6 +1248,8 @@ describe Msf::DBManager do
end
end
it { is_expected.to respond_to :sink }
context '#update_all_module_details' do
def update_all_module_details
db_manager.update_all_module_details
@ -1788,4 +1821,10 @@ describe Msf::DBManager do
end
end
end
it { is_expected.to respond_to :usable }
it { is_expected.to respond_to :usable= }
it { is_expected.to respond_to :warn_about_rubies }
it { is_expected.to respond_to :workspace }
it { is_expected.to respond_to :workspace= }
end