790704ef58
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 ....... ``` |
||
---|---|---|
.. | ||
.keep | ||
2017_07_18_clean_followed_dossiers.rake | ||
2017_07_26_clean_birthdate_on_individual.rake | ||
2017_08_01_clean_assign_to.rake | ||
2017_09_19_set_confidentialite_to_old_avis.rake | ||
2017_09_22_set_dossier_updated_replied_to_initiated.rake | ||
2017_10_06_set_follow_date.rake | ||
2017_10_18_regenerate_attestation.rake | ||
2017_10_30_copy_commentaire_piece_justificative_to_file.rake | ||
2017_12_04_translate_dossier_state_to_french.rake | ||
2017_12_05_initialize_timestamps_for_entreprises.rake | ||
2017_12_20_delete_old_administration.rake | ||
2017_12_21_replace_deprecated_mail_template_tags.rake | ||
2018_01_11_add_active_state_to_administrators.rake | ||
2018_01_18_clean_datetime_in_champs.rake | ||
2018_02_13_fill_champ_private_and_type.rake | ||
2018_02_14_clean_double_champ_private.rake | ||
2018_02_20_remove_duplicated_assign_tos.rake | ||
2018_02_20_set_processed_at.rake | ||
2018_02_28_clean_gestionnaire_emails.rake | ||
2018_03_06_clean_html_textareas.rake | ||
2018_03_08_send_missed_accuse_reception.rake | ||
2018_03_29_inline_entreprise_association.rake | ||
2018_03_29_procedure_description_markup.rake | ||
2018_03_29_remove_code_tags_from_mail_templates.rake | ||
2018_04_03_attestation_closed_mail_discrepancy.rake | ||
2018_04_03_type_individual_date.rake | ||
2018_04_04_fetch_etablissement_with_no_entreprise.rake | ||
2018_04_11_admin_or_gestionnaire_users.rake | ||
2018_05_09_add_test_started_at_to_procedure.rake | ||
2018_05_14_add_annotation_privee_to_procedure.rake | ||
2018_05_15_add_aasm_state_to_procedure.rake | ||
2018_05_21_cerfa_to_pj.rake | ||
2018_05_24_optional_durees_conservation_for_legacy_procedures.rake | ||
2018_05_30_missed_ar_messages.rake | ||
2018_06_01_optional_juridique_for_legacy_procedures.rake | ||
2018_06_04_scan_pjs.rake | ||
2018_06_05_resend_attestations.rake | ||
2018_06_05_send_new_attestations.rake | ||
2018_06_06_users_for_admins_and_gestionnaires.rake | ||
admin.rake | ||
cloud_storage.rake | ||
dev.rake | ||
task_helper.rb |