Skip to content

Commit 6a54f0a

Browse files
committed
Spec methods from db_manager.rb
MSP-11466
1 parent c093359 commit 6a54f0a

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

spec/lib/msf/db_manager_spec.rb

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,18 @@
2121
it_should_behave_like 'Msf::DBManager::Migration'
2222
it_should_behave_like 'Msf::DBManager::ImportMsfXml'
2323

24+
context 'CONSTANTS' do
25+
context 'ADAPTER' do
26+
subject(:adapter) {
27+
described_class::ADAPTER
28+
}
29+
30+
it { is_expected.to eq('postgresql') }
31+
end
32+
end
33+
34+
it { is_expected.to respond_to :active }
35+
2436
context '#add_rails_engine_migration_paths' do
2537
def add_rails_engine_migration_paths
2638
db_manager.add_rails_engine_migration_paths
@@ -39,6 +51,23 @@ def add_rails_engine_migration_paths
3951
end
4052
end
4153

54+
it { is_expected.to respond_to :after_establish_connection }
55+
it { is_expected.to respond_to :connect }
56+
it { is_expected.to respond_to :connection_established? }
57+
it { is_expected.to respond_to :create_db }
58+
it { is_expected.to respond_to :disconnect }
59+
it { is_expected.to respond_to :driver }
60+
it { is_expected.to respond_to :drivers }
61+
it { is_expected.to respond_to :drivers= }
62+
it { is_expected.to respond_to :error }
63+
it { is_expected.to respond_to :initialize_adapter }
64+
it { is_expected.to respond_to :initialize_database_support }
65+
it { is_expected.to respond_to :initialize_sink }
66+
it { is_expected.to respond_to :modules_cached }
67+
it { is_expected.to respond_to :modules_cached= }
68+
it { is_expected.to respond_to :modules_cached }
69+
it { is_expected.to respond_to :modules_cached= }
70+
4271
context '#purge_all_module_details' do
4372
def purge_all_module_details
4473
db_manager.purge_all_module_details
@@ -106,6 +135,8 @@ def purge_all_module_details
106135
end
107136
end
108137

138+
it { is_expected.to respond_to :queue }
139+
109140
context '#remove_module_details' do
110141
def remove_module_details
111142
db_manager.remove_module_details(mtype, refname)
@@ -1217,6 +1248,8 @@ def remove_module_details
12171248
end
12181249
end
12191250

1251+
it { is_expected.to respond_to :sink }
1252+
12201253
context '#update_all_module_details' do
12211254
def update_all_module_details
12221255
db_manager.update_all_module_details
@@ -1788,4 +1821,10 @@ def loader.load_error(module_path, error)
17881821
end
17891822
end
17901823
end
1824+
1825+
it { is_expected.to respond_to :usable }
1826+
it { is_expected.to respond_to :usable= }
1827+
it { is_expected.to respond_to :warn_about_rubies }
1828+
it { is_expected.to respond_to :workspace }
1829+
it { is_expected.to respond_to :workspace= }
17911830
end

0 commit comments

Comments
 (0)