Skip to content

Commit

Permalink
yak-shaving cleanup / reorg
Browse files Browse the repository at this point in the history
  • Loading branch information
danschmidt5189 committed Jan 24, 2025
1 parent 0327335 commit de59598
Showing 1 changed file with 12 additions and 6 deletions.
18 changes: 12 additions & 6 deletions bin/test
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,20 @@
require "fileutils"

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

# Run coverage checks during rspec
ENV['COVERAGE'] = '1'

# Required for the DB down/up test
ENV['DISABLE_DATABASE_ENVIRONMENT_CHECK'] = '1'

# Test commands (to be exec'd in order)
TESTS = [
%w(rspec -f html),
%w(rubocop),
%w(rails --trace db:drop db:create db:migrate),
]

FileUtils.chdir APP_ROOT do
# 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 }
exit TESTS.reduce(true) { |passfail, cmd| system(*cmd) && passfail }
end

0 comments on commit de59598

Please # to comment.