Hi Marko

The `driven_by` functionality comes straight from Rails, it seems this issue is 
essentially what you are experiencing:

https://github.com/rails/rails/issues/32468

And the TL;DR solution is to add `name:` to the options, e.g. `name: 
'cuprite_mobile', screen_size: ...`

Cheers
Jon

On Tue, 8 Mar 2022, at 1:42 PM, Marko Avlijas wrote:
> Hi,
> 
> I am working on an application which uses different partials for mobile and 
> desktop version. Both are served in every request. I need to test turbo code 
> that replaces all of these partials. Mobile version even has different 
> workflow compared to desktop app in some parts.
> 
> In short I want to have separate system tests for mobile and desktop version.
> 
> I thought I could achieve that by having different driven by in before block.
> 
> driven_by(:cuprite, screen_size: [1400, 1400], options: CUPRITE_OPTIONS)
> driven_by(:cuprite, screen_size: [400, 800], options: CUPRITE_OPTIONS)
> 
> Unfortunately these settings are not respected. It seems that first system 
> spec that sets driven_by is what rspec uses for entire test suite.
> 
> Is it possible to achieve separate system specs for mobile and desktop 
> version and how?
> 
> Thank you,
> 
> Marko
> 
> 
> 
> 
> -- 
> 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 view this discussion on the web visit 
> https://groups.google.com/d/msgid/rspec/fad54242-fa9d-4764-b215-119b23cfafd0n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/rspec/fad54242-fa9d-4764-b215-119b23cfafd0n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/7405a326-be6c-4033-b36f-873ffcb1f936%40www.fastmail.com.

Reply via email to