diff --git a/spec/lib/msf/core/module_spec.rb b/spec/lib/msf/core/module_spec.rb index 73c39dafb7..e848bd4b7d 100644 --- a/spec/lib/msf/core/module_spec.rb +++ b/spec/lib/msf/core/module_spec.rb @@ -38,6 +38,101 @@ end REF_TYPES = %w(CVE BID OSVDB EDB) describe Msf::Module do + it { is_expected.to respond_to :[] } + it { is_expected.to respond_to :[]= } + it { is_expected.to respond_to :alias } + it { is_expected.to respond_to :arch? } + it { is_expected.to respond_to :arch_to_s } + it { is_expected.to respond_to :author_to_s } + it { is_expected.to respond_to :auxiliary? } + it { is_expected.to respond_to :check } + it { is_expected.to respond_to :comm } + it { is_expected.to respond_to :compat } + it { is_expected.to respond_to :compatible? } + it { is_expected.to respond_to :debugging? } + it { is_expected.to respond_to :deregister_options } + it { is_expected.to respond_to :derived_implementor? } + it { is_expected.to respond_to :description } + it { is_expected.to respond_to :disclosure_date } + it { is_expected.to respond_to :each_arch } + it { is_expected.to respond_to :each_author } + it { is_expected.to respond_to :encoder? } + it { is_expected.to respond_to :exploit? } + it { is_expected.to respond_to :fail_with } + it { is_expected.to respond_to :file_path } + it { is_expected.to respond_to :framework } + it { is_expected.to respond_to :fullname } + it { is_expected.to respond_to :generate_uuid } + it { is_expected.to respond_to :import_defaults } + it { is_expected.to respond_to :info_fixups } + it { is_expected.to respond_to :init_compat } + it { is_expected.to respond_to :merge_check_key } + it { is_expected.to respond_to :merge_info } + it { is_expected.to respond_to :merge_info_advanced_options } + it { is_expected.to respond_to :merge_info_alias } + it { is_expected.to respond_to :merge_info_description } + it { is_expected.to respond_to :merge_info_evasion_options } + it { is_expected.to respond_to :merge_info_name } + it { is_expected.to respond_to :merge_info_options } + it { is_expected.to respond_to :merge_info_string } + it { is_expected.to respond_to :merge_info_version } + it { is_expected.to respond_to :name } + it { is_expected.to respond_to :nop? } + it { is_expected.to respond_to :orig_cls } + it { is_expected.to respond_to :owner } + it { is_expected.to respond_to :payload? } + 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 } + it { is_expected.to respond_to :rank_to_s } + it { is_expected.to respond_to :refname } + it { is_expected.to respond_to :register_advanced_options } + it { is_expected.to respond_to :register_evasion_options } + it { is_expected.to respond_to :register_options } + it { is_expected.to respond_to :register_parent } + it { is_expected.to respond_to :replicant } + it { is_expected.to respond_to :set_defaults } + it { is_expected.to respond_to :share_datastore } + it { is_expected.to respond_to :shortname } + it { is_expected.to respond_to :support_ipv6? } + it { is_expected.to respond_to :target_host } + it { is_expected.to respond_to :target_port } + it { is_expected.to respond_to :type } + it { is_expected.to respond_to :update_info } + it { is_expected.to respond_to :validate } + it { is_expected.to respond_to :vprint_debug } + it { is_expected.to respond_to :vprint_error } + it { is_expected.to respond_to :vprint_good } + it { is_expected.to respond_to :vprint_line } + it { is_expected.to respond_to :vprint_status } + it { is_expected.to respond_to :vprint_warning } + it { is_expected.to respond_to :workspace } + + context 'class' do + subject { + described_class + } + + it { is_expected.to respond_to :cached? } + it { is_expected.to respond_to :fullname } + it { is_expected.to respond_to :is_usable } + it { is_expected.to respond_to :rank } + it { is_expected.to respond_to :rank_to_h } + it { is_expected.to respond_to :rank_to_s } + it { is_expected.to respond_to :shortname } + it { is_expected.to respond_to :type } + end + describe '#search_filter' do let(:opts) { Hash.new } before { subject.stub(:fullname => '/module') }