Override Rails default test command

Hello everyone,

CircleCI does not seem to respect an override command in the circle.yml test section for Rails projects using rspec.

Whatever command we tried to put in the test.override section, CircleCI still runs RAILS_ENV=test bundle exec rake afterwards.

This causes our attempt to use JUnit report files to fail, as this rake command runs rspec tests and scenario tests afterwards and the latter overwrites the JUnit report of the first run (if we do not add some weird logic to split up these files…but thats another topic).

Is this intended behaviour?

I’m using docker-compose to run my rails tests and I’m hitting this same wall. My understanding is that Circle does a bunch of Rails-specific stuff when it detects a Gemfile, not just in the test section, but in dependencies and database as well. I’m playing with overriding each of these sections, but would love to know if you figured this out.

fwiw, I’m having some succes with this:

machine:
  pre:
    - curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
  services:
    - docker
dependencies:
  override:
    - docker info
    - sudo pip install docker-compose
    - docker-compose -f docker-test.yml build test
database:
  override:
    - echo "Skipping database install..."
test:
  override:
    - docker-compose -f docker-test.yml run test

Is this an issue? Do you have a circle.yml file or snippet that we can look at?