Skip to content

Instantly share code, notes, and snippets.

@biinari
Last active July 7, 2021 00:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save biinari/09bf2b6f6ebeab7c4eac0021ddae07a6 to your computer and use it in GitHub Desktop.
Save biinari/09bf2b6f6ebeab7c4eac0021ddae07a6 to your computer and use it in GitHub Desktop.
Find specs that do not follow the necessary conventional file name '*_spec.rb'. These will not be run by RSpec so should be changed.
#!/bin/sh
find */spec -type f \
-name '*.rb' \
-not -name '*_fabricator.rb' \
-not -name '*_spec.rb' \
-not -name 'spec_helper.rb' \
-not -path '*/cassettes/*' \
-not -path '*/dummy/*' \
-not -path '*/expected/*' \
-not -path '*/factories/*' \
-not -path '*/fixtures/*' \
-not -path '*/samples/*' \
-not -path '*/shared_contexts/*' \
-not -path '*/site_prism/*' \
-not -path '*/spec/config/*' \
-not -path '*/spec/fabricators/*' \
-not -path '*/spec/roles/*' \
-not -path '*/support/*' \
-not -path '*/vcr_cassettes/*'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment