Skip to content

Instantly share code, notes, and snippets.

@HerbCSO
Created October 17, 2019 16:05
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 HerbCSO/cf655c1826600d2bf40243bd547bfcab to your computer and use it in GitHub Desktop.
Save HerbCSO/cf655c1826600d2bf40243bd547bfcab to your computer and use it in GitHub Desktop.
Switching from minitest to rspec
for dirs in app/*; do
dir=$(basename $dirs | sed 's/s$//')
echo $dir
for file in $(find ${dirs}/* -type f -not -name "_*"); do
rails generate rspec:${dir} ${$(basename ${file%.*} | sed 's/_'${dir}'//')%.*}
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment