Sha256: 8bda504af79d482a731ae7589d90f518ac653307c8352e43c525fb63e917641c
Contents?: true
Size: 843 Bytes
Versions: 63
Compression:
Stored size: 843 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 visitor.attribute_visitor.should_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') visitor.attribute_visitor.stub(:visit).with(operator).and_return(attribute) attribute.should_receive(:eq).with(value) visit end end
Version data entries
63 entries across 63 versions & 1 rubygems