diff --git a/spec/lib/msf/core/module_spec.rb b/spec/lib/msf/core/module_spec.rb index dde97c7a11..4bfc2c9bf1 100644 --- a/spec/lib/msf/core/module_spec.rb +++ b/spec/lib/msf/core/module_spec.rb @@ -78,13 +78,8 @@ describe Msf::Module do it { is_expected.to respond_to :platform? } it { is_expected.to respond_to :platform_to_s } it { is_expected.to respond_to :post? } - it { is_expected.to respond_to :print_error } - it { is_expected.to respond_to :print_good } it { is_expected.to respond_to :print_line } it { is_expected.to respond_to :print_line_prefix } - it { is_expected.to respond_to :print_prefix } - it { is_expected.to respond_to :print_status } - it { is_expected.to respond_to :print_warning } it { is_expected.to respond_to :privileged? } it { is_expected.to respond_to :rank } it { is_expected.to respond_to :rank_to_h } @@ -114,6 +109,7 @@ describe Msf::Module do it_should_behave_like 'Msf::Module::Compatibility' it_should_behave_like 'Msf::Module::DataStore' it_should_behave_like 'Msf::Module::ModuleStore' + it_should_behave_like 'Msf::Module::UI' context 'CONSTANTS' do context 'UpdateableOptions' do diff --git a/spec/support/shared/examples/msf/module/ui.rb b/spec/support/shared/examples/msf/module/ui.rb new file mode 100644 index 0000000000..455e302839 --- /dev/null +++ b/spec/support/shared/examples/msf/module/ui.rb @@ -0,0 +1,3 @@ +shared_examples_for 'Msf::Module::UI' do + it_should_behave_like 'Msf::Module::UI::Message' +end \ No newline at end of file diff --git a/spec/support/shared/examples/msf/module/ui/message.rb b/spec/support/shared/examples/msf/module/ui/message.rb new file mode 100644 index 0000000000..72f4fae72b --- /dev/null +++ b/spec/support/shared/examples/msf/module/ui/message.rb @@ -0,0 +1,7 @@ +shared_examples_for 'Msf::Module::UI::Message' do + it { is_expected.to respond_to :print_error } + it { is_expected.to respond_to :print_good } + it { is_expected.to respond_to :print_prefix } + it { is_expected.to respond_to :print_status } + it { is_expected.to respond_to :print_warning } +end \ No newline at end of file