Test multiple directories on circle ci?

260 Views Asked by At

I've got a rails application that has some engines in the same repo. These are intended to keep logic for "payments" with payments and logic for "admin" with admin.

The effect is almost perfect. All the TTD work is done in the engine folders.. they each have a spec folder

What I'm struggling with today is that CircleCI doesn't know to test the engines. It doesn't seem to find the spec files in the engines.

Q: Does anyone know how to add other directories to their circle rspec run?

1

There are 1 best solutions below

0
On

If all you spec are in spec directory but in different places you can specify rspec to run every *_spec.rb file under /spec/ directory like this

 rspec -P  **/spec/**/*_spec.rb 

so in circleci config file, it would be something like

- run:
   command: rspec -P  **/spec/**/*_spec.rb