Its looks like your doubles are some how leaking between examples, I’d wager 
its something to do with your service injector but I’m unsure without a proper 
example.

Cheers
Jon Rowe
---------------------------
[email protected]
jonrowe.co.uk

On 23 October 2018 at 15:58, belgoros wrote:
> On Tuesday, 23 October 2018 16:55:35 UTC+2, belgoros wrote:
> I forgot to put the rest of the example (see the dummy service 
> initialization):
>
> it 'sends a successful response with sports data' do
>
> ServiceProvider.register(:sports_service, SuccessfulSportsService)
>
> service = ServiceProvider.get(:sports_service)
>
> allow (service).to 
> receive(:execute_request).with(anything).and_return(successful_response)
>
> service_data = service.
> call
> sports_values_to_check
> = service_data.map {|sport| {id: sport.id, label: sport.label}}
>
> expect (sports_values_to_check).to include(id: 1, label: 'sport-1')
>
> end

-- 
You received this message because you are subscribed to the Google Groups 
"rspec" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/dejalu-192-b821fc64-7c66-4295-896a-f9b2f6e6d1ad%40jonrowe.co.uk.
For more options, visit https://groups.google.com/d/optout.

Reply via email to