• Toon Claes's avatar
    Improve mocking on Geo::NodeStatusService · 9190e081
    Toon Claes authored
    The following is not supported:
    
    ```ruby
    allow_any_instance_of(Geo::NodeStatusService).to receive(:call) { build(:geo_node_status, :healthy, cursor_last_event_id: 3) }
    allow_any_instance_of(Geo::NodeStatusService).to receive(:call) { build(:geo_node_status, :healthy, cursor_last_event_id: 10) }
    ```
    
    So instead, mock `Geo::NodeStatusService.new` and make it return a
    `double` that can be used to mock all the things.
    9190e081
prune_event_log_worker.rb 942 Bytes