Sha256: dac1d212945abc012dd957be758307212a7c0cfbdc3042c38967cc7df127d44d

Contents?: true

Size: 1.13 KB

Versions: 68

Compression:

Stored size: 1.13 KB

Contents

RSpec.describe MetasploitDataModels::Search::Visitor::Method, type: :model do
  subject(:visitor) do
    described_class.new
  end

  it_should_behave_like 'Metasploit::Concern.run'

  context '#visit' do
    subject(:visit) do
      visitor.visit(node)
    end

    let(:node) do
      node_class.new
    end

    context 'with Metasploit::Model::Search::Group::Intersection' do
      let(:node_class) do
        Metasploit::Model::Search::Group::Intersection
      end

      it { is_expected.to eq(:and) }
    end

    context 'with Metasploit::Model::Search::Operation::Group::Intersection' do
      let(:node_class) do
        Metasploit::Model::Search::Operation::Group::Intersection
      end

      it { is_expected.to eq(:and) }
    end

    context 'with Metasploit::Model::Search::Group::Union' do
      let(:node_class) do
        Metasploit::Model::Search::Group::Union
      end

      it { is_expected.to eq(:or) }
    end

    context 'with Metasploit::Model::Search::Operation::Group::Union' do
      let(:node_class) do
        Metasploit::Model::Search::Operation::Group::Union
      end

      it { is_expected.to eq(:or) }
    end
  end
end

Version data entries

68 entries across 68 versions & 2 rubygems

Version Path
wg-metasploit_data_models-4.1.4.02 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-6.0.5 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-6.0.4 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-6.0.3 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-6.0.2 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-6.0.1 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-6.0.0 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-5.0.6 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-5.0.5 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-5.0.4 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-5.0.3 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-5.0.2 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-5.0.1 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-5.0.0 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-4.1.4 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-4.1.3 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-4.1.2 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-4.1.1 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-4.1.0 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-4.0.2 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb