Added support for Rails test environment