Skip to content

Commit

Permalink
Merge pull request #1749 from tvdeyen/fail-prepare-task
Browse files Browse the repository at this point in the history
Fail spec prepare task if sub command fails
  • Loading branch information
tvdeyen authored Mar 18, 2020
2 parents ec17038 + 1ce5fae commit 9f6f61c
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions Rakefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,15 @@ namespace :alchemy do
namespace :spec do
desc "Prepares database for testing Alchemy"
task :prepare do
system <<-BASH
cd spec/dummy
export RAILS_ENV=test
bin/rake db:create
bin/rake db:environment:set
bin/rake db:migrate:reset
cd -
BASH
result = system <<~BASH
cd spec/dummy && \
export RAILS_ENV=test && \
bin/rake db:create && \
bin/rake db:environment:set && \
bin/rake db:migrate:reset && \
cd -
BASH
result || fail
end
end

Expand Down

0 comments on commit 9f6f61c

Please sign in to comment.