demarches-normaliennes/spec
Pierre de La Morinerie 790704ef58 tasks: silence output of tasks during tests
Currently, when running specs, the output of rake tasks is spamming
the tests results.

This PR configures Rake so that it runs in quiet mode during specs. This
disables the internal messages of rake during tests.

However our own `puts` also need to be conditionned to the verbosity of
rake. Using a simple `rake_puts` helper allows the info messages to be
displayed when running the rake task manually, but not during tests.

Before:

```
$ bin/rspec spec/lib/rake
Randomized with seed 6544
1 Mails::ClosedMail to clean
cleaning Mails::ClosedMail #1
1 Mails::InitiatedMail to clean
cleaning Mails::InitiatedMail #1
1 Mails::ReceivedMail to clean
cleaning Mails::ReceivedMail #1
1 Mails::RefusedMail to clean
cleaning Mails::RefusedMail #1
1 Mails::WithoutContinuationMail to clean
cleaning Mails::WithoutContinuationMail #1
.....Champ 0/1
.Champ 0/1
.
```

After:

```
$ bin/rspec spec/lib/rake

Randomized with seed 6544
.......
```
2018-06-13 11:05:15 +02:00
..
controllers [fix #2072] DossierController: check the user can update the dossier 2018-06-08 16:24:29 +02:00
decorators Remove unused decorators 2018-05-24 17:54:51 +02:00
facades describe '#method' rather than describe '.method' for instance methods 2018-03-20 16:00:30 +01:00
factories When a new PJ is uploaded enqueue a anti virus scan job 2018-06-12 15:12:39 +02:00
features [#2071] Fix test now that mails are multipart 2018-06-10 11:53:51 +02:00
fixtures [Fix #1120] Delete the old accompagnateur UI 2018-01-15 10:02:10 +01:00
helpers [#1946] Show retention times in procedure administration summary 2018-06-01 17:35:04 +02:00
jobs When a new PJ is uploaded enqueue a anti virus scan job 2018-06-12 15:12:39 +02:00
lib Fix class methods on BizDev module 2018-06-06 16:07:29 +02:00
mailers Fix a typo 2018-06-08 15:14:22 +02:00
models When a new PJ is uploaded enqueue a anti virus scan job 2018-06-12 15:12:39 +02:00
serializers [#1995] Add gender and birthdate fields to API 2018-05-31 14:21:37 +02:00
services Add SignatureService 2018-04-04 18:44:08 +02:00
support Optimisation des images 2018-03-06 16:14:59 +01:00
uploaders Enable the Layout/EmptyLinesAroundBlockBody cop 2017-06-13 10:35:23 +02:00
views Use User#owns_or_invite? instead of Dossier#owner_or_invite? 2018-05-31 14:39:43 +02:00
rails_helper.rb Bump development gems 2018-03-06 16:17:22 +01:00
spec_helper.rb tasks: silence output of tasks during tests 2018-06-13 11:05:15 +02:00