Allow bet to trigger rspec or minitest

This commit is contained in:
Andrew Tomaka 2020-01-21 10:03:18 -05:00
parent fd0327b02c
commit 0c3fd7a84e
Signed by: atomaka
GPG key ID: 61209BF70A5B18BE
2 changed files with 9 additions and 1 deletions

View file

@ -8,7 +8,7 @@ alias b="bundle"
alias be="bundle exec" alias be="bundle exec"
alias bea="bundle exec rails" alias bea="bundle exec rails"
alias ber="bundle exec rake" alias ber="bundle exec rake"
alias bet="bundle exec rspec" alias bet="test-rails"
alias betd="bundle exec rspec --format documentation" alias betd="bundle exec rspec --format documentation"
alias c="clear" alias c="clear"
alias dc="docker-compose" alias dc="docker-compose"

View file

@ -103,6 +103,14 @@ function stopwatch {
done done
} }
function test-rails {
if bundle exec rspec --help > /dev/null 2>&1; then
bundle exec rspec
else
bundle exec rails test
fi
}
function yarn-exec { function yarn-exec {
(PATH=$(yarn bin):$PATH; eval $@;) (PATH=$(yarn bin):$PATH; eval $@;)
} }