Created
August 1, 2016 13:16
-
-
Save studious/16256dbc2dc6fe20eaa4129b2ba17d37 to your computer and use it in GitHub Desktop.
Test scaffold for Rails project built with components
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
result=0 | |
cd "$( dirname "${BASH_SOURCE[0]}" )" | |
for test_script in $(find . -name test.sh); do | |
pushd `dirname $test_script` > /dev/null | |
./test.sh | |
result+=$? | |
popd > /dev/null | |
done | |
if [ $result -eq 0 ]; then | |
echo "SUCCESS" | |
else | |
echo "FAILURE" | |
fi | |
exit $result |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
exit_code=0 | |
echo "*** Running container app specs" | |
RAILS_ENV=test bundle exec rake environment db:create db:migrate | |
bundle exec rspec spec | |
exit_code+=$? | |
exit $exit_code |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment