There is no reason why you can't run `rspec lib/mygem/spec` that should 
work as is, to RSpec it's no different to running say, `rspec 
spec/unit/model` but it does require the specs written to know that they 
might be run in such a fashion. Mostly thats modifying the path, you could 
do this in their spec helpers and make sure youj always require the spec 
helper relative to the files calling, or just add all the spec folders into 
rspec path from the top level spec helper etc
On Friday, 28 January 2022 at 20:32:48 UTC je...@deepdivr.io wrote:

> Hi, a quick question / feature request / how would you do it?
>
> We have a few local gems in our libs folder. E.g. libs/mygem/...
>
> The gems have their own specs in libs/mygem/spec/...
>
> It's getting tiresome to cd in and out of folders to run the different 
> spec. Ideally, something like:
>
> `rspec lib/mygem/spec/` would run the specs of the folder as if it was 
> initialized in in the lib/mygem folder - so the paths etc works.
>
> Do you guys have any smart solution to this? Would it make sense to 
> support redirectly in rspec? Am I just being too lazy?
>
> Interested to hear what you think :-)
>

-- 
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 rspec+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rspec/26c4a915-7d1f-492a-936d-3177697178f8n%40googlegroups.com.

Reply via email to