Sha256: 133f853bb6598a6043196e46602bd1bea4cb6795c3d99cd03dd37c8390741fb7

Contents?: true

Size: 703 Bytes

Versions: 63

Compression:

Stored size: 703 Bytes

Contents

shared_examples_for 'MetasploitDataModels::Search::Visitor::Includes#visit with Metasploit::Model::Search::Operation::Base' do
  let(:operator) do
    double('Operation Operator')
  end

  let(:node) do
    node_class.new(
        :operator => operator
    )
  end

  it 'should visit operator' do
    visitor.should_receive(:visit).with(node).and_call_original
    visitor.should_receive(:visit).with(operator).and_return([])

    visit
  end

  it 'should return operator visit' do
    operator_visit = ["Visited Operator"]
    visitor.should_receive(:visit).with(node).and_call_original
    visitor.stub(:visit).with(operator).and_return(operator_visit)

    visit.should == operator_visit
  end
end

Version data entries

63 entries across 63 versions & 1 rubygems

Version Path
metasploit_data_models-0.24.5 spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb
metasploit_data_models-0.24.1 spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb
metasploit_data_models-1.0.0.pre.rails.pre.4.0b spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb
metasploit_data_models-1.0.0.pre.rails.pre.4.0a spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb
metasploit_data_models-0.24.0 spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb
metasploit_data_models-0.23.3.pre.autoload spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb
metasploit_data_models-0.23.2 spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb
metasploit_data_models-0.23.2-java spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb
metasploit_data_models-0.23.1 spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb
metasploit_data_models-0.23.1-java spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb
metasploit_data_models-0.23.0 spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb
metasploit_data_models-0.23.0-java spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb
metasploit_data_models-0.22.8 spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb
metasploit_data_models-0.22.8-java spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb
metasploit_data_models-0.22.7 spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb
metasploit_data_models-0.22.7-java spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb
metasploit_data_models-0.22.6 spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb
metasploit_data_models-0.22.6-java spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb
metasploit_data_models-0.22.5 spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb
metasploit_data_models-0.22.5-java spec/support/shared/examples/metasploit_data_models/search/visitor/includes/visit/with_metasploit_model_search_operation_base.rb