Sha256: dac1d212945abc012dd957be758307212a7c0cfbdc3042c38967cc7df127d44d

Contents?: true

Size: 1.13 KB

Versions: 69

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

69 entries across 69 versions & 2 rubygems

Version Path
metasploit_data_models-4.0.2 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-4.0.1 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-4.0.0 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-3.0.10 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-3.0.9 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-3.0.8 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-3.0.7 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-3.0.6 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-3.0.5 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-2.0.17 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-3.0.4 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-3.0.2 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-3.0.1 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-3.0.0 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-2.0.16 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-2.0.15 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-2.0.14 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-2.0.13 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-2.0.12 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb
metasploit_data_models-2.0.11 spec/app/models/metasploit_data_models/search/visitor/method_spec.rb