Sha256: 526157228ef95b6901a7587066a0a174e010dd9eb182214da8cb6eec8af3f925
Contents?: true
Size: 864 Bytes
Versions: 18
Compression:
Stored size: 864 Bytes
Contents
shared_examples_for 'MetasploitDataModels::Search::Visitor::Where#visit with equality operation' do let(:node) do node_class.new( :operator => operator, :value => value ) end let(:operator) do Metasploit::Model::Search::Operator::Attribute.new( # any class that responds to arel_table :klass => Mdm::Host ) end let(:value) do "value" end it 'should visit operation.operator with attribute_visitor' do expect(visitor.attribute_visitor).to receive(:visit).with(operator).and_call_original visit end it 'should call eq on Arel::Attributes::Attribute from attribute_visitor' do attribute = double('Visited Operator') allow(visitor.attribute_visitor).to receive(:visit).with(operator).and_return(attribute) expect(attribute).to receive(:eq).with(value) visit end end
Version data entries
18 entries across 18 versions & 1 rubygems