Improve mocking on Geo::NodeStatusService
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.
Showing
Please register or sign in to comment