Class: Deepsearch::SearchAdapters::MockAdapter

Inherits:
Object
  • Object
show all
Defined in:
lib/search_adapters/mock_adapter.rb

Overview

A mock search adapter for testing purposes. It returns a static, predefined set of search results without making any external API calls. This is useful for testing the pipeline’s behavior in isolation from live search services.

Instance Method Summary collapse

Constructor Details

#initialize(api_key = nil) ⇒ MockAdapter

Returns a new instance of MockAdapter.



9
# File 'lib/search_adapters/mock_adapter.rb', line 9

def initialize(api_key = nil); end

Instance Method Details

#search(query, options = {}) ⇒ Object



11
12
13
# File 'lib/search_adapters/mock_adapter.rb', line 11

def search(query, options = {})
  mock_results(query, options)
end