Sha256: bf5273b83a8bf0611577cdab3c6dd3e8a6e6d784060002e0c8efccc3d635a2ac

Contents?: true

Size: 708 Bytes

Versions: 8

Compression:

Stored size: 708 Bytes

Contents

RSpec.describe Metasploit::Model::Search::Operator::Base, type: :model do
  subject(:operator) do
    described_class.new
  end

  it_should_behave_like 'Metasploit::Model::Search::Operator::Help' do
    let(:operator) do
      described_class.new(klass: klass)
    end

    before(:each) do
      # have to stub since it's not implemented on base
      allow(operator).to receive(:name).and_return(name)
    end
  end

  context 'validations' do
    it { is_expected.to validate_presence_of(:klass) }
  end

  context '#name' do
    subject(:name) do
      operator.name
    end

    it 'should not be implemented' do
      expect {
        name
      }.to raise_error(NotImplementedError)
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

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