From 43a4858fe35fc1d66e016a7fd258c8b740826e8e Mon Sep 17 00:00:00 2001 From: Luke Imhoff Date: Mon, 13 Oct 2014 12:01:49 -0500 Subject: [PATCH] Extract Msf::DBManager::Web shared examples MSP-11124 --- spec/lib/msf/db_manager_spec.rb | 5 +---- spec/support/shared/examples/msf/db_manager/web.rb | 6 ++++++ 2 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 spec/support/shared/examples/msf/db_manager/web.rb diff --git a/spec/lib/msf/db_manager_spec.rb b/spec/lib/msf/db_manager_spec.rb index 39f6e2ea1c..210afd046b 100644 --- a/spec/lib/msf/db_manager_spec.rb +++ b/spec/lib/msf/db_manager_spec.rb @@ -45,6 +45,7 @@ describe Msf::DBManager do it_should_behave_like 'Msf::DBManager::VulnAttempt' it_should_behave_like 'Msf::DBManager::VulnDetail' it_should_behave_like 'Msf::DBManager::WMAP' + it_should_behave_like 'Msf::DBManager::Web' it_should_behave_like 'Msf::DBManager::Workspace' context 'CONSTANTS' do @@ -89,10 +90,6 @@ describe Msf::DBManager do 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 :report_web_form } - it { is_expected.to respond_to :report_web_page } - it { is_expected.to respond_to :report_web_site } - it { is_expected.to respond_to :report_web_vuln } it { is_expected.to respond_to :service_name_map } it { is_expected.to respond_to :usable } it { is_expected.to respond_to :usable= } diff --git a/spec/support/shared/examples/msf/db_manager/web.rb b/spec/support/shared/examples/msf/db_manager/web.rb new file mode 100644 index 0000000000..ba0335b115 --- /dev/null +++ b/spec/support/shared/examples/msf/db_manager/web.rb @@ -0,0 +1,6 @@ +shared_examples_for 'Msf::DBManager::Web' do + it { is_expected.to respond_to :report_web_form } + it { is_expected.to respond_to :report_web_page } + it { is_expected.to respond_to :report_web_site } + it { is_expected.to respond_to :report_web_vuln } +end \ No newline at end of file