Sha256: 9ffc0ff8f8d0cce3cacc9d340818faa39cdf6eb3a2ad81b6034a64e48906f3cc

Contents?: true

Size: 867 Bytes

Versions: 8

Compression:

Stored size: 867 Bytes

Contents

RSpec.describe Metasploit::Model::Search::Operator::Help do
  it_should_behave_like 'Metasploit::Model::Search::Operator::Help' do
    let(:operator) do
      operator_class.new(
          klass: klass,
          name: name
      )
    end

    let(:operator_class) do
      described_class = self.described_class

      Class.new(Metasploit::Model::Base) do
        include described_class

        #
        # Attributes
        #

        # @!attribute [rw] name
        #   Name of this operator
        #
        #   @return [String]
        attr_accessor :name

        # @!attribute [rw] klass
        #   Class being searched
        #
        #   @return [Class]
        attr_accessor :klass
      end
    end

    before(:each) do
      # operator needs to be named or mode_name will fail.
      stub_const('OperatorClass', operator_class)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
metasploit-model-1.0.2 spec/lib/metasploit/model/search/operator/help_spec.rb
metasploit-model-1.0.1 spec/lib/metasploit/model/search/operator/help_spec.rb
metasploit-model-1.0.0 spec/lib/metasploit/model/search/operator/help_spec.rb
metasploit-model-0.30.2 spec/lib/metasploit/model/search/operator/help_spec.rb
metasploit-model-0.30.2-java spec/lib/metasploit/model/search/operator/help_spec.rb
metasploit-model-0.30.1 spec/lib/metasploit/model/search/operator/help_spec.rb
metasploit-model-0.30.1-java spec/lib/metasploit/model/search/operator/help_spec.rb
metasploit-model-0.30.1.pre.rspec.pre.3.pre.1 spec/lib/metasploit/model/search/operator/help_spec.rb