Skip to content

Commit

Permalink
run_all_tests.sh understands already run rspec/cucumber
Browse files Browse the repository at this point in the history
  • Loading branch information
karhatsu committed Mar 2, 2015
1 parent f91290d commit 61a1e93
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .gitignore
@@ -1,4 +1,6 @@
STABLE_COMMIT
STABLE_COMMIT_RSPEC
STABLE_COMMIT_CUKE
.bundle
.idea
.project
Expand Down
18 changes: 16 additions & 2 deletions run_all_tests.sh
Expand Up @@ -3,8 +3,22 @@ set -e
if [ "$(cat STABLE_COMMIT)" != "$(git rev-list --max-count=1 HEAD)" ]
then
echo "Running all tests..."
spring rspec spec
spring cucumber --format progress features
if [ "$(cat STABLE_COMMIT_RSPEC)" != "$(git rev-list --max-count=1 HEAD)" ]
then
echo "Running RSpec..."
spring rspec spec
git rev-list --max-count=1 HEAD > STABLE_COMMIT_RSPEC
else
echo "No need to run RSpec."
fi
if [ "$(cat STABLE_COMMIT_CUKE)" != "$(git rev-list --max-count=1 HEAD)" ]
then
echo "Running Cucumber..."
spring cucumber --format progress features
git rev-list --max-count=1 HEAD > STABLE_COMMIT_CUKE
else
echo "No need to run Cucumber."
fi
spring cucumber -p js --format progress features
git rev-list --max-count=1 HEAD > STABLE_COMMIT
else
Expand Down

0 comments on commit 61a1e93

Please sign in to comment.