Using SimpleCov with nginx and passenger

187 Views Asked by At

We have an application written in Rails 3 which we deploy to Ubuntu servers running nginx/Passenger. We run a suite of tests against a test server using Watir.

I have SimpleCov installed and running locally. It works as expected on the test server as well but only when started using 'rails s'.

The issue is when the Rails application is running using passenger -- the coverage results are never generated. I suspect this may be because the application doesn't exit as it typically does when running unit tests.

Does anyone know if this is a valid use of SimpleCov? If so, are there special configuration requirements?

1

There are 1 best solutions below

0
Hongli On

That is probably because SimpleCov hooks into 'exit', but Phusion Passenger 3 calls 'exit!' to shut down application processes, which bypasses 'exit' hooks. This problem has been solved in Phusion Passenger 4.