demarches-normaliennes/lib
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
..
active_storage/service Implement new download_chunk method 2018-04-24 16:07:19 +02:00
cellar Allow downloads with a HTTP range header 2018-04-24 16:07:19 +02:00
mailers Add constants for email addresses 2018-06-01 00:00:11 +02:00
prawn/fonts [Fix #196] AttestionTemplate: add preview 2017-06-16 12:11:09 +02:00
tasks tasks: silence output of tasks during tests 2018-06-13 11:05:15 +02:00
templates/haml/scaffold Change controller name according to model name, add simple_form 2017-01-24 15:53:42 +01:00