test:
  override:
    # leftover build artifacts (in the tmp directory) can cause marshalling errors; delete tmp before every run.
    - rm -Rf tmp
    - RAILS_ENV=test bundle exec rspec -r rspec_junit_formatter --format RspecJunitFormatter -o $CIRCLE_TEST_REPORTS/rspec/junit.xml

general:
  artifacts:
    - log
    - tmp
test:
  pre:
    - rm -Rf tmp
  override:
    # leftover build artifacts (in the tmp directory) can cause marshalling errors; delete tmp before every run.
    - RAILS_ENV=test bundle exec rspec -r rspec_junit_formatter --format RspecJunitFormatter -o $CIRCLE_TEST_REPORTS/rspec/junit.xml

general:
  artifacts:
    - log
    - tmp
Move tmp dir cleanup to pre step.
Move tmp dir cleanup to pre step.