Skip to content

Commit

Permalink
Run the same tests that were previously run
Browse files Browse the repository at this point in the history
  • Loading branch information
danschmidt5189 committed Jan 23, 2025
1 parent 8f857a5 commit 0327335
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,14 @@
require "fileutils"

APP_ROOT = File.expand_path("..", __dir__)

def system!(*args)
system(*args) || abort("\n== Command #{args} failed ==")
end
ENV['COVERAGE'] = '1'
ENV['DISABLE_DATABASE_ENVIRONMENT_CHECK'] = '1'

FileUtils.chdir APP_ROOT do
system! "rspec -f html"
# Runs all the tests sequentially, exiting 0 if all succeed and 1 otherwise.
exit [
%w(rspec -f html),
%w(rubocop),
%w(rails --trace db:drop db:create db:migrate),
].reduce(true) { |passfail, cmd| system(*cmd) && passfail }
end

0 comments on commit 0327335

Please sign in to comment.