Skip to content

Instantly share code, notes, and snippets.

@HerbCSO

HerbCSO/switch.sh

Created Oct 17, 2019
Embed
What would you like to do?
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