Run Coveralls only in Travis CI

We were seeing a log message when running specs locally

```
[Coveralls] Set up the SimpleCov formatter.
[Coveralls] Using SimpleCov's 'rails' settings.
```

As Coveralls is mainly used in Travis CI, we do not need to load it in
every spec run
This commit is contained in:
rgarcia
2018-02-06 01:09:09 +01:00
parent 6f4d23fdef
commit 7b7a426f6a

View File

@@ -1,6 +1,8 @@
ENV['RAILS_ENV'] ||= 'test'
if ENV['TRAVIS']
require 'coveralls'
Coveralls.wear!('rails')
ENV['RAILS_ENV'] ||= 'test'
end
require File.expand_path('../../config/environment', __FILE__)
abort("The Rails environment is running in production mode!") if Rails.env.production?