Sha256: ea3c60ae8ceae1f3133e8ae8ede5558f95f5b79f789f2eaaf44cf70e15a91d7e
Contents?: true
Size: 960 Bytes
Versions: 38
Compression:
Stored size: 960 Bytes
Contents
shared_examples_for 'search query' do |options={}| options.assert_valid_keys(:formatted_operator) formatted_operator = options.fetch(:formatted_operator) context "with #{formatted_operator}" do subject(:query) do Metasploit::Model::Search::Query.new( :formatted => formatted, :klass => base_class ) end let(:formatted) do "#{formatted_operator}:\"#{formatted_value}\"" end let(:formatted_value) do "formatted_value" end context 'operations' do subject(:operations) do query.operations end context 'operator with matching name' do subject(:operator) do operation.operator end let(:operation) do operations.find { |operation| operation.operator.name == formatted_operator.to_sym } end it { should_not be_nil } it { should be_valid } end end end end
Version data entries
38 entries across 38 versions & 1 rubygems