diff --git a/.rspec b/.rspec index 83e16f804..0f30adeb0 100644 --- a/.rspec +++ b/.rspec @@ -1,2 +1,2 @@ --color ---require spec_helper +--require rails_helper diff --git a/spec/controllers/admin/assigns_controller_spec.rb b/spec/controllers/admin/assigns_controller_spec.rb index 741937dd8..bc48da393 100644 --- a/spec/controllers/admin/assigns_controller_spec.rb +++ b/spec/controllers/admin/assigns_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Admin::AssignsController, type: :controller do let(:admin) { create(:administrateur) } diff --git a/spec/controllers/admin/instructeurs_controller_spec.rb b/spec/controllers/admin/instructeurs_controller_spec.rb index fd92a4757..1c89a9bbd 100644 --- a/spec/controllers/admin/instructeurs_controller_spec.rb +++ b/spec/controllers/admin/instructeurs_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Admin::InstructeursController, type: :controller do let(:admin) { create(:administrateur) } let(:email_2) { 'plip@octo.com' } diff --git a/spec/controllers/admin/mail_templates_controller_spec.rb b/spec/controllers/admin/mail_templates_controller_spec.rb index a2eec599f..b237eeb1d 100644 --- a/spec/controllers/admin/mail_templates_controller_spec.rb +++ b/spec/controllers/admin/mail_templates_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Admin::MailTemplatesController, type: :controller do let(:procedure) { create :procedure } let(:initiated_mail) { Mails::InitiatedMail.default_for_procedure(procedure) } diff --git a/spec/controllers/admin/procedures_controller_spec.rb b/spec/controllers/admin/procedures_controller_spec.rb index 0ff35f9d8..52f9b248b 100644 --- a/spec/controllers/admin/procedures_controller_spec.rb +++ b/spec/controllers/admin/procedures_controller_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'uri' describe Admin::ProceduresController, type: :controller do diff --git a/spec/controllers/administrations/omniauth_callbacks_controller_spec.rb b/spec/controllers/administrations/omniauth_callbacks_controller_spec.rb index f98848006..09e68e8c8 100644 --- a/spec/controllers/administrations/omniauth_callbacks_controller_spec.rb +++ b/spec/controllers/administrations/omniauth_callbacks_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Administrations::OmniauthCallbacksController, type: :controller do before(:each) do @request.env["devise.mapping"] = Devise.mappings[:administration] diff --git a/spec/controllers/api/v1/dossiers_controller_spec.rb b/spec/controllers/api/v1/dossiers_controller_spec.rb index ad9907b93..cfbcc11c5 100644 --- a/spec/controllers/api/v1/dossiers_controller_spec.rb +++ b/spec/controllers/api/v1/dossiers_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe API::V1::DossiersController do let(:admin) { create(:administrateur) } let(:token) { admin.renew_api_token } diff --git a/spec/controllers/api/v2/graphql_controller_spec.rb b/spec/controllers/api/v2/graphql_controller_spec.rb index 57e5e4f7f..79ba46128 100644 --- a/spec/controllers/api/v2/graphql_controller_spec.rb +++ b/spec/controllers/api/v2/graphql_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe API::V2::GraphqlController do let(:admin) { create(:administrateur) } let(:token) { admin.renew_api_token } diff --git a/spec/controllers/api_controller_spec.rb b/spec/controllers/api_controller_spec.rb index 1c1535b16..f83116629 100644 --- a/spec/controllers/api_controller_spec.rb +++ b/spec/controllers/api_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe APIController, type: :controller do describe 'valid_token_for_procedure?' do let(:procedure) { create(:procedure) } diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb index 8289c3482..37b9bf8c0 100644 --- a/spec/controllers/application_controller_spec.rb +++ b/spec/controllers/application_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe ApplicationController, type: :controller do describe 'before_action: set_raven_context' do it 'is present' do diff --git a/spec/controllers/attachments_controller_spec.rb b/spec/controllers/attachments_controller_spec.rb index c9b732ca5..706912383 100644 --- a/spec/controllers/attachments_controller_spec.rb +++ b/spec/controllers/attachments_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe AttachmentsController, type: :controller do let(:user) { create(:user) } diff --git a/spec/controllers/champs/carte_controller_spec.rb b/spec/controllers/champs/carte_controller_spec.rb index dbba13ebb..e1a952714 100644 --- a/spec/controllers/champs/carte_controller_spec.rb +++ b/spec/controllers/champs/carte_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Champs::CarteController, type: :controller do let(:user) { create(:user) } let(:procedure) { create(:procedure, :published) } diff --git a/spec/controllers/champs/dossier_link_controller_spec.rb b/spec/controllers/champs/dossier_link_controller_spec.rb index f4cda12de..f58392579 100644 --- a/spec/controllers/champs/dossier_link_controller_spec.rb +++ b/spec/controllers/champs/dossier_link_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Champs::DossierLinkController, type: :controller do let(:user) { create(:user) } let(:procedure) { create(:procedure, :published) } diff --git a/spec/controllers/champs/siret_controller_spec.rb b/spec/controllers/champs/siret_controller_spec.rb index cd7163803..cc9929ebb 100644 --- a/spec/controllers/champs/siret_controller_spec.rb +++ b/spec/controllers/champs/siret_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Champs::SiretController, type: :controller do let(:user) { create(:user) } let(:procedure) { create(:procedure, :published) } diff --git a/spec/controllers/concerns/procedure_context_concern_spec.rb b/spec/controllers/concerns/procedure_context_concern_spec.rb index 5911e1686..9a3f81e25 100644 --- a/spec/controllers/concerns/procedure_context_concern_spec.rb +++ b/spec/controllers/concerns/procedure_context_concern_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - RSpec.describe ProcedureContextConcern, type: :controller do class TestController < ActionController::Base include ProcedureContextConcern diff --git a/spec/controllers/devise/store_location_extension_spec.rb b/spec/controllers/devise/store_location_extension_spec.rb index f43a041b4..1156fcdd0 100644 --- a/spec/controllers/devise/store_location_extension_spec.rb +++ b/spec/controllers/devise/store_location_extension_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - RSpec.describe Devise::StoreLocationExtension, type: :controller do class TestController < ActionController::Base include Devise::Controllers::StoreLocation diff --git a/spec/controllers/instructeurs/avis_controller_spec.rb b/spec/controllers/instructeurs/avis_controller_spec.rb index bdefc0009..52c1f5d5d 100644 --- a/spec/controllers/instructeurs/avis_controller_spec.rb +++ b/spec/controllers/instructeurs/avis_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Instructeurs::AvisController, type: :controller do context 'with a instructeur signed in' do render_views diff --git a/spec/controllers/instructeurs/dossiers_controller_spec.rb b/spec/controllers/instructeurs/dossiers_controller_spec.rb index 80e0afe42..c9a0b13ef 100644 --- a/spec/controllers/instructeurs/dossiers_controller_spec.rb +++ b/spec/controllers/instructeurs/dossiers_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Instructeurs::DossiersController, type: :controller do render_views diff --git a/spec/controllers/instructeurs/instructeur_controller_spec.rb b/spec/controllers/instructeurs/instructeur_controller_spec.rb index 3c8ae4dff..3825a6801 100644 --- a/spec/controllers/instructeurs/instructeur_controller_spec.rb +++ b/spec/controllers/instructeurs/instructeur_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Instructeurs::InstructeurController, type: :controller do describe 'before actions: authenticate_instructeur!' do it 'is present' do diff --git a/spec/controllers/instructeurs/procedures_controller_spec.rb b/spec/controllers/instructeurs/procedures_controller_spec.rb index 638d4313b..a3965bca6 100644 --- a/spec/controllers/instructeurs/procedures_controller_spec.rb +++ b/spec/controllers/instructeurs/procedures_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Instructeurs::ProceduresController, type: :controller do describe "before_action: ensure_ownership!" do it "is present" do diff --git a/spec/controllers/instructeurs/recherche_controller_spec.rb b/spec/controllers/instructeurs/recherche_controller_spec.rb index 415939a1d..8698c6102 100644 --- a/spec/controllers/instructeurs/recherche_controller_spec.rb +++ b/spec/controllers/instructeurs/recherche_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Instructeurs::RechercheController, type: :controller do let(:dossier) { create(:dossier, :en_construction) } let(:dossier2) { create(:dossier, :en_construction, procedure: dossier.procedure) } diff --git a/spec/controllers/invites_controller_spec.rb b/spec/controllers/invites_controller_spec.rb index 3a78d9fba..c26030a8b 100644 --- a/spec/controllers/invites_controller_spec.rb +++ b/spec/controllers/invites_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe InvitesController, type: :controller do let(:dossier) { create(:dossier, :en_construction) } let(:email) { 'plop@octo.com' } diff --git a/spec/controllers/ping_controller_spec.rb b/spec/controllers/ping_controller_spec.rb index 1c723512c..0649048f7 100644 --- a/spec/controllers/ping_controller_spec.rb +++ b/spec/controllers/ping_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe PingController, type: :controller do describe 'GET #index' do subject { get :index } diff --git a/spec/controllers/root_controller_spec.rb b/spec/controllers/root_controller_spec.rb index 0afe43037..0e9b25956 100644 --- a/spec/controllers/root_controller_spec.rb +++ b/spec/controllers/root_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe RootController, type: :controller do subject { get :index } diff --git a/spec/controllers/stats_controller_spec.rb b/spec/controllers/stats_controller_spec.rb index b70d75fab..d4547e81c 100644 --- a/spec/controllers/stats_controller_spec.rb +++ b/spec/controllers/stats_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe StatsController, type: :controller do describe "#last_four_months_hash" do context "while a regular user is logged in" do diff --git a/spec/controllers/support_controller_spec.rb b/spec/controllers/support_controller_spec.rb index 4ae584139..72ebfcff0 100644 --- a/spec/controllers/support_controller_spec.rb +++ b/spec/controllers/support_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe SupportController, type: :controller do render_views diff --git a/spec/controllers/users/commencer_controller_spec.rb b/spec/controllers/users/commencer_controller_spec.rb index 539cfaa7c..bf80703e8 100644 --- a/spec/controllers/users/commencer_controller_spec.rb +++ b/spec/controllers/users/commencer_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Users::CommencerController, type: :controller do let(:user) { create(:user) } let(:published_procedure) { create(:procedure, :published) } diff --git a/spec/controllers/users/confirmations_controller_spec.rb b/spec/controllers/users/confirmations_controller_spec.rb index 1944d1a6a..758cde53f 100644 --- a/spec/controllers/users/confirmations_controller_spec.rb +++ b/spec/controllers/users/confirmations_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Users::ConfirmationsController, type: :controller do let!(:user) { create(:user, :unconfirmed) } let(:confirmation_token) { user.confirmation_token } diff --git a/spec/controllers/users/dossiers_controller_spec.rb b/spec/controllers/users/dossiers_controller_spec.rb index b0e34bc9b..9802b7c36 100644 --- a/spec/controllers/users/dossiers_controller_spec.rb +++ b/spec/controllers/users/dossiers_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Users::DossiersController, type: :controller do let(:user) { create(:user) } diff --git a/spec/controllers/users/passwords_controller_spec.rb b/spec/controllers/users/passwords_controller_spec.rb index 216f1ca45..f52ebc65f 100644 --- a/spec/controllers/users/passwords_controller_spec.rb +++ b/spec/controllers/users/passwords_controller_spec.rb @@ -1,5 +1,3 @@ -require "spec_helper" - describe Users::PasswordsController, type: :controller do before do @request.env["devise.mapping"] = Devise.mappings[:user] diff --git a/spec/controllers/users/profil_controller_spec.rb b/spec/controllers/users/profil_controller_spec.rb index 82fe1706e..2d79fca85 100644 --- a/spec/controllers/users/profil_controller_spec.rb +++ b/spec/controllers/users/profil_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Users::ProfilController, type: :controller do include ActiveJob::TestHelper diff --git a/spec/controllers/users/user_controller_spec.rb b/spec/controllers/users/user_controller_spec.rb index f5601760e..d8a224919 100644 --- a/spec/controllers/users/user_controller_spec.rb +++ b/spec/controllers/users/user_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Users::UserController, type: :controller do describe 'before actions: authenticate_instructeur!' do it 'is present' do diff --git a/spec/controllers/webhook_controller_spec.rb b/spec/controllers/webhook_controller_spec.rb index 81e07e8c6..26badc63c 100644 --- a/spec/controllers/webhook_controller_spec.rb +++ b/spec/controllers/webhook_controller_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe WebhookController, type: :controller do describe '#helpscout' do before { allow(controller).to receive(:verify_signature!).and_return(true) } diff --git a/spec/features/admin/admin_creation_spec.rb b/spec/features/admin/admin_creation_spec.rb index a5ce312dc..88e3de6b4 100644 --- a/spec/features/admin/admin_creation_spec.rb +++ b/spec/features/admin/admin_creation_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - feature 'As an administrateur', js: true do let(:administration) { create(:administration) } let(:admin_email) { 'new_admin@gouv.fr' } diff --git a/spec/features/admin/procedure_cloning_spec.rb b/spec/features/admin/procedure_cloning_spec.rb index 2377e7980..1550f41be 100644 --- a/spec/features/admin/procedure_cloning_spec.rb +++ b/spec/features/admin/procedure_cloning_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'features/admin/procedure_spec_helper' feature 'As an administrateur I wanna clone a procedure', js: true do diff --git a/spec/features/admin/procedure_creation_spec.rb b/spec/features/admin/procedure_creation_spec.rb index de7b75a29..2f33cf8ab 100644 --- a/spec/features/admin/procedure_creation_spec.rb +++ b/spec/features/admin/procedure_creation_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'features/admin/procedure_spec_helper' feature 'As an administrateur I wanna create a new procedure', js: true do diff --git a/spec/features/admin/procedure_locked_spec.rb b/spec/features/admin/procedure_locked_spec.rb index eeb76dd44..a358e8fc1 100644 --- a/spec/features/admin/procedure_locked_spec.rb +++ b/spec/features/admin/procedure_locked_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - feature 'procedure locked' do let(:administrateur) { create(:administrateur) } diff --git a/spec/features/admin/procedure_update_spec.rb b/spec/features/admin/procedure_update_spec.rb index 7fc165ab3..9a8c98f79 100644 --- a/spec/features/admin/procedure_update_spec.rb +++ b/spec/features/admin/procedure_update_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'features/admin/procedure_spec_helper' feature 'Administrateurs can edit procedures', js: true do diff --git a/spec/features/france_connect/france_connect_particulier_spec.rb b/spec/features/france_connect/france_connect_particulier_spec.rb index ac26aa26a..123a10d7d 100644 --- a/spec/features/france_connect/france_connect_particulier_spec.rb +++ b/spec/features/france_connect/france_connect_particulier_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - feature 'France Connect Particulier Connexion' do let(:code) { 'plop' } let(:given_name) { 'titi' } diff --git a/spec/features/help_spec.rb b/spec/features/help_spec.rb index 0f01cbafb..4aa7de431 100644 --- a/spec/features/help_spec.rb +++ b/spec/features/help_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - feature 'Getting help:' do scenario 'a Help button is visible on public pages' do visit '/' diff --git a/spec/features/instructeurs/expert_spec.rb b/spec/features/instructeurs/expert_spec.rb index ea81ab324..aa3ebf0b8 100644 --- a/spec/features/instructeurs/expert_spec.rb +++ b/spec/features/instructeurs/expert_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - feature 'Inviting an expert:' do include ActiveJob::TestHelper include ActionView::Helpers diff --git a/spec/features/instructeurs/instructeur_creation_spec.rb b/spec/features/instructeurs/instructeur_creation_spec.rb index 189144cb6..59ece170c 100644 --- a/spec/features/instructeurs/instructeur_creation_spec.rb +++ b/spec/features/instructeurs/instructeur_creation_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - feature 'As an instructeur', js: true do let(:administrateur) { create(:administrateur, :with_procedure) } let(:procedure) { administrateur.procedures.first } diff --git a/spec/features/instructeurs/instruction_spec.rb b/spec/features/instructeurs/instruction_spec.rb index 884b73631..017942f90 100644 --- a/spec/features/instructeurs/instruction_spec.rb +++ b/spec/features/instructeurs/instruction_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - feature 'Instructing a dossier:' do include ActiveJob::TestHelper diff --git a/spec/features/instructeurs/procedure_filters_spec.rb b/spec/features/instructeurs/procedure_filters_spec.rb index 144305ff7..faaa5f9b4 100644 --- a/spec/features/instructeurs/procedure_filters_spec.rb +++ b/spec/features/instructeurs/procedure_filters_spec.rb @@ -1,5 +1,3 @@ -require "spec_helper" - feature "procedure filters" do let(:instructeur) { create(:instructeur) } let(:procedure) { create(:procedure, :published, :with_type_de_champ, instructeurs: [instructeur]) } diff --git a/spec/features/new_administrateur/types_de_champ_spec.rb b/spec/features/new_administrateur/types_de_champ_spec.rb index ace602aa7..625fb9b1d 100644 --- a/spec/features/new_administrateur/types_de_champ_spec.rb +++ b/spec/features/new_administrateur/types_de_champ_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - feature 'As an administrateur I can edit types de champ', js: true do let(:administrateur) { procedure.administrateurs.first } let(:procedure) { create(:procedure) } diff --git a/spec/features/outdated_browser_spec.rb b/spec/features/outdated_browser_spec.rb index e6cb28efb..8ca379658 100644 --- a/spec/features/outdated_browser_spec.rb +++ b/spec/features/outdated_browser_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - feature 'Outdated browsers support:' do context 'when the user browser is outdated' do before(:each) do diff --git a/spec/features/routing/full_scenario_spec.rb b/spec/features/routing/full_scenario_spec.rb index 0401a8ade..612f38cd4 100644 --- a/spec/features/routing/full_scenario_spec.rb +++ b/spec/features/routing/full_scenario_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - feature 'The routing', js: true do let(:password) { 'a very complicated password' } let(:procedure) { create(:procedure, :with_type_de_champ, :with_service, :for_individual) } diff --git a/spec/features/sessions/sign_in_spec.rb b/spec/features/sessions/sign_in_spec.rb index 25ddf3c55..acbecc6dc 100644 --- a/spec/features/sessions/sign_in_spec.rb +++ b/spec/features/sessions/sign_in_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - feature 'Signin in:' do let!(:user) { create(:user, password: password) } let(:password) { 'démarches-simplifiées-pwd' } diff --git a/spec/features/users/brouillon_spec.rb b/spec/features/users/brouillon_spec.rb index 9de07012e..2b45260b4 100644 --- a/spec/features/users/brouillon_spec.rb +++ b/spec/features/users/brouillon_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - feature 'The user' do let(:password) { 'démarches-simplifiées-pwd' } let!(:user) { create(:user, password: password) } diff --git a/spec/features/users/change_email_spec.rb b/spec/features/users/change_email_spec.rb index 00933a698..016f3ee90 100644 --- a/spec/features/users/change_email_spec.rb +++ b/spec/features/users/change_email_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - feature 'Changing an email' do let(:old_email) { 'old@email.com' } let(:user) { create(:user, email: old_email) } diff --git a/spec/features/users/dossier_creation_spec.rb b/spec/features/users/dossier_creation_spec.rb index b15f6ece0..6a1a357a8 100644 --- a/spec/features/users/dossier_creation_spec.rb +++ b/spec/features/users/dossier_creation_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - feature 'Creating a new dossier:' do let(:user) { create(:user) } let(:siret) { '40307130100044' } diff --git a/spec/features/users/invite_spec.rb b/spec/features/users/invite_spec.rb index e1d9cebd0..f80c3ab07 100644 --- a/spec/features/users/invite_spec.rb +++ b/spec/features/users/invite_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'features/users/dossier_shared_examples.rb' feature 'Invitations' do diff --git a/spec/features/users/linked_dropdown_spec.rb b/spec/features/users/linked_dropdown_spec.rb index 1b088a0d0..97c7e46ec 100644 --- a/spec/features/users/linked_dropdown_spec.rb +++ b/spec/features/users/linked_dropdown_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - feature 'linked dropdown lists' do let(:password) { 'démarches-simplifiées-pwd' } let!(:user) { create(:user, password: password) } diff --git a/spec/features/users/list_dossiers_spec.rb b/spec/features/users/list_dossiers_spec.rb index ee0cf27e9..fa514bd06 100644 --- a/spec/features/users/list_dossiers_spec.rb +++ b/spec/features/users/list_dossiers_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'user access to the list of their dossiers' do let(:user) { create(:user) } let!(:dossier_brouillon) { create(:dossier, user: user) } diff --git a/spec/features/users/managing_password_spec.rb b/spec/features/users/managing_password_spec.rb index 3d0393f1d..52aa4c109 100644 --- a/spec/features/users/managing_password_spec.rb +++ b/spec/features/users/managing_password_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - feature 'Managing password:' do context 'for simple users' do let(:user) { create(:user) } diff --git a/spec/features/users/sign_out_spec.rb b/spec/features/users/sign_out_spec.rb index b77edb604..85516afcb 100644 --- a/spec/features/users/sign_out_spec.rb +++ b/spec/features/users/sign_out_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - feature 'Sign out' do context 'when a user is logged in' do let(:user) { create(:administrateur).user } diff --git a/spec/features/users/sign_up_spec.rb b/spec/features/users/sign_up_spec.rb index 4fb8fd0a7..a9a411616 100644 --- a/spec/features/users/sign_up_spec.rb +++ b/spec/features/users/sign_up_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - feature 'Signing up:' do let(:user_email) { generate :user_email } let(:user_password) { 'démarches-simplifiées-pwd' } diff --git a/spec/helpers/commentaire_helper_spec.rb b/spec/helpers/commentaire_helper_spec.rb index c295535e7..e54b1a860 100644 --- a/spec/helpers/commentaire_helper_spec.rb +++ b/spec/helpers/commentaire_helper_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - RSpec.describe CommentaireHelper, type: :helper do let(:commentaire) { create(:commentaire, email: "michel@pref.fr") } diff --git a/spec/helpers/conservation_de_donnees_helper_spec.rb b/spec/helpers/conservation_de_donnees_helper_spec.rb index 8edacefe9..e0eb3c181 100644 --- a/spec/helpers/conservation_de_donnees_helper_spec.rb +++ b/spec/helpers/conservation_de_donnees_helper_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - RSpec.describe ConservationDeDonneesHelper, type: :helper do let(:procedure) { build(:procedure, duree_conservation_dossiers_dans_ds: dans_ds, duree_conservation_dossiers_hors_ds: hors_ds) } diff --git a/spec/helpers/dossier_helper_spec.rb b/spec/helpers/dossier_helper_spec.rb index aea4f92de..0bf33c397 100644 --- a/spec/helpers/dossier_helper_spec.rb +++ b/spec/helpers/dossier_helper_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - RSpec.describe DossierHelper, type: :helper do describe ".highlight_if_unseen_class" do let(:seen_at) { Time.zone.now } diff --git a/spec/jobs/administrateur_activate_before_expiration_job_spec.rb b/spec/jobs/administrateur_activate_before_expiration_job_spec.rb index 95d610d8a..504f8cef4 100644 --- a/spec/jobs/administrateur_activate_before_expiration_job_spec.rb +++ b/spec/jobs/administrateur_activate_before_expiration_job_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - RSpec.describe AdministrateurActivateBeforeExpirationJob, type: :job do describe 'perform' do let(:administrateur) { create(:administrateur) } diff --git a/spec/jobs/application_job_spec.rb b/spec/jobs/application_job_spec.rb index 053156f92..cb1b6ceac 100644 --- a/spec/jobs/application_job_spec.rb +++ b/spec/jobs/application_job_spec.rb @@ -1,4 +1,3 @@ -require 'rails_helper' include ActiveJob::TestHelper RSpec.describe ApplicationJob, type: :job do diff --git a/spec/jobs/auto_archive_procedure_job_spec.rb b/spec/jobs/auto_archive_procedure_job_spec.rb index 52f97ed32..3f1600b6c 100644 --- a/spec/jobs/auto_archive_procedure_job_spec.rb +++ b/spec/jobs/auto_archive_procedure_job_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - RSpec.describe AutoArchiveProcedureJob, type: :job do let!(:procedure) { create(:procedure, :published, :with_instructeur, auto_archive_on: nil) } let!(:procedure_hier) { create(:procedure, :published, :with_instructeur, auto_archive_on: 1.day.ago.to_date) } diff --git a/spec/jobs/declarative_procedures_job_spec.rb b/spec/jobs/declarative_procedures_job_spec.rb index 98a0de5d5..4a4238174 100644 --- a/spec/jobs/declarative_procedures_job_spec.rb +++ b/spec/jobs/declarative_procedures_job_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - RSpec.describe DeclarativeProceduresJob, type: :job do describe "perform" do let(:date) { Time.utc(2017, 9, 1, 10, 5, 0) } diff --git a/spec/jobs/find_dubious_procedures_job_spec.rb b/spec/jobs/find_dubious_procedures_job_spec.rb index 06d1123b9..3bd6fd50f 100644 --- a/spec/jobs/find_dubious_procedures_job_spec.rb +++ b/spec/jobs/find_dubious_procedures_job_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - RSpec.describe FindDubiousProceduresJob, type: :job do describe 'perform' do let(:mailer_double) { double('mailer', deliver_later: true) } diff --git a/spec/jobs/weekly_overview_job_spec.rb b/spec/jobs/weekly_overview_job_spec.rb index 3e558c4c7..3aa7a44e2 100644 --- a/spec/jobs/weekly_overview_job_spec.rb +++ b/spec/jobs/weekly_overview_job_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - RSpec.describe WeeklyOverviewJob, type: :job do describe 'perform' do let!(:instructeur) { create(:instructeur) } diff --git a/spec/lib/api_carto/api_spec.rb b/spec/lib/api_carto/api_spec.rb index bb03c40e5..c0c8dd73b 100644 --- a/spec/lib/api_carto/api_spec.rb +++ b/spec/lib/api_carto/api_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe ApiCarto::API do describe '.search_qp' do subject { described_class.search_qp(geojson) } diff --git a/spec/lib/api_carto/cadastre_adapter_spec.rb b/spec/lib/api_carto/cadastre_adapter_spec.rb index 63d7f83c9..7d2d5860d 100644 --- a/spec/lib/api_carto/cadastre_adapter_spec.rb +++ b/spec/lib/api_carto/cadastre_adapter_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe ApiCarto::CadastreAdapter do subject { described_class.new(coordinates).results } diff --git a/spec/lib/api_carto/quartiers_prioritaires_adapter_spec.rb b/spec/lib/api_carto/quartiers_prioritaires_adapter_spec.rb index 70593327d..4f1988bae 100644 --- a/spec/lib/api_carto/quartiers_prioritaires_adapter_spec.rb +++ b/spec/lib/api_carto/quartiers_prioritaires_adapter_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe ApiCarto::QuartiersPrioritairesAdapter do subject { described_class.new(coordinates).results } diff --git a/spec/lib/api_entreprise/api_spec.rb b/spec/lib/api_entreprise/api_spec.rb index d247e0f37..403cd460c 100644 --- a/spec/lib/api_entreprise/api_spec.rb +++ b/spec/lib/api_entreprise/api_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe ApiEntreprise::API do let(:procedure_id) { 12 } diff --git a/spec/lib/api_entreprise/entreprise_adapter_spec.rb b/spec/lib/api_entreprise/entreprise_adapter_spec.rb index 56c78d8aa..b3f72e26c 100644 --- a/spec/lib/api_entreprise/entreprise_adapter_spec.rb +++ b/spec/lib/api_entreprise/entreprise_adapter_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe ApiEntreprise::EntrepriseAdapter do let(:siren) { '418166096' } let(:procedure_id) { 22 } diff --git a/spec/lib/api_entreprise/etablissement_adapter_spec.rb b/spec/lib/api_entreprise/etablissement_adapter_spec.rb index ba1876a5e..2cd381955 100644 --- a/spec/lib/api_entreprise/etablissement_adapter_spec.rb +++ b/spec/lib/api_entreprise/etablissement_adapter_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe ApiEntreprise::EtablissementAdapter do let(:procedure_id) { 33 } diff --git a/spec/lib/api_entreprise/exercices_adapter_spec.rb b/spec/lib/api_entreprise/exercices_adapter_spec.rb index bf0c3e131..d22cf3aab 100644 --- a/spec/lib/api_entreprise/exercices_adapter_spec.rb +++ b/spec/lib/api_entreprise/exercices_adapter_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe ApiEntreprise::ExercicesAdapter do let(:siret) { '41816609600051' } let(:procedure_id) { 11 } diff --git a/spec/lib/api_entreprise/rna_adapter_spec.rb b/spec/lib/api_entreprise/rna_adapter_spec.rb index 43d964c1e..3ed08d34b 100644 --- a/spec/lib/api_entreprise/rna_adapter_spec.rb +++ b/spec/lib/api_entreprise/rna_adapter_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe ApiEntreprise::RNAAdapter do let(:siret) { '50480511000013' } let(:procedure_id) { 22 } diff --git a/spec/lib/asn1/timestamp_spec.rb b/spec/lib/asn1/timestamp_spec.rb index 3ae0d6272..4d7f03218 100644 --- a/spec/lib/asn1/timestamp_spec.rb +++ b/spec/lib/asn1/timestamp_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe ASN1::Timestamp do let(:asn1timestamp) { File.read('spec/fixtures/files/bill_signature/signature.der') } diff --git a/spec/lib/biz_dev_spec.rb b/spec/lib/biz_dev_spec.rb index 475e93332..0d22c87a2 100644 --- a/spec/lib/biz_dev_spec.rb +++ b/spec/lib/biz_dev_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe BizDev, lib: true do let(:first_biz_dev_id) { BizDev::PIPEDRIVE_ID } let(:non_biz_dev_id) { first_biz_dev_id - 1 } diff --git a/spec/lib/helpscout/form_adapter_spec.rb b/spec/lib/helpscout/form_adapter_spec.rb index 8bccafcfc..275d77418 100644 --- a/spec/lib/helpscout/form_adapter_spec.rb +++ b/spec/lib/helpscout/form_adapter_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Helpscout::FormAdapter do describe '#send_form' do let(:api) { spy(double(:api)) } diff --git a/spec/lib/helpscout/user_conversations_adapter_spec.rb b/spec/lib/helpscout/user_conversations_adapter_spec.rb index 980fd7d21..84e9f676d 100644 --- a/spec/lib/helpscout/user_conversations_adapter_spec.rb +++ b/spec/lib/helpscout/user_conversations_adapter_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Helpscout::UserConversationsAdapter do let(:from) { Date.new(2017, 11) } let(:to) { Date.new(2017, 12) } diff --git a/spec/lib/pipedrive/deal_adapter_spec.rb b/spec/lib/pipedrive/deal_adapter_spec.rb index bce1ad0e5..5d7583673 100644 --- a/spec/lib/pipedrive/deal_adapter_spec.rb +++ b/spec/lib/pipedrive/deal_adapter_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Pipedrive::DealAdapter do let(:url) { PIPEDRIVE_API_URL } let(:status) { 200 } diff --git a/spec/lib/tasks/graphql_spec.rb b/spec/lib/tasks/graphql_spec.rb index 3543a6de5..04bf2ebe8 100644 --- a/spec/lib/tasks/graphql_spec.rb +++ b/spec/lib/tasks/graphql_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'graphql' do let(:current_defn) { Api::V2::Schema.to_definition } let(:printout_defn) { File.read(Rails.root.join('app', 'graphql', 'schema.graphql')) } diff --git a/spec/lib/tasks/task_helper_spec.rb b/spec/lib/tasks/task_helper_spec.rb index 4d02d159c..e0d512dad 100644 --- a/spec/lib/tasks/task_helper_spec.rb +++ b/spec/lib/tasks/task_helper_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe ProgressReport, lib: true do context 'when the count pass above 100%' do let(:total) { 2 } diff --git a/spec/lib/typhoeus/cache/successful_requests_rails_cache.rb b/spec/lib/typhoeus/cache/successful_requests_rails_cache.rb index 24c6bb9a1..8940e9002 100644 --- a/spec/lib/typhoeus/cache/successful_requests_rails_cache.rb +++ b/spec/lib/typhoeus/cache/successful_requests_rails_cache.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Typhoeus::Cache::SuccessfulRequestsRailsCache, lib: true do let(:cache) { described_class.new } diff --git a/spec/lib/universign/api_spec.rb b/spec/lib/universign/api_spec.rb index 124076ba5..0d026642c 100644 --- a/spec/lib/universign/api_spec.rb +++ b/spec/lib/universign/api_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Universign::API do describe '.request_timestamp', vcr: { cassette_name: 'universign' } do subject { described_class.timestamp(digest) } diff --git a/spec/mailers/avis_mailer_spec.rb b/spec/mailers/avis_mailer_spec.rb index 06210d773..ff9f5bd7d 100644 --- a/spec/mailers/avis_mailer_spec.rb +++ b/spec/mailers/avis_mailer_spec.rb @@ -1,5 +1,3 @@ -require "rails_helper" - RSpec.describe AvisMailer, type: :mailer do describe '.avis_invitation' do let(:avis) { create(:avis) } diff --git a/spec/mailers/dossier_mailer_spec.rb b/spec/mailers/dossier_mailer_spec.rb index afb42fd98..a7578880b 100644 --- a/spec/mailers/dossier_mailer_spec.rb +++ b/spec/mailers/dossier_mailer_spec.rb @@ -1,5 +1,3 @@ -require "rails_helper" - RSpec.describe DossierMailer, type: :mailer do let(:to_email) { 'instructeur@exemple.gouv.fr' } diff --git a/spec/mailers/notification_mailer_spec.rb b/spec/mailers/notification_mailer_spec.rb index 4301b27b0..667fc4eaf 100644 --- a/spec/mailers/notification_mailer_spec.rb +++ b/spec/mailers/notification_mailer_spec.rb @@ -1,5 +1,3 @@ -require "spec_helper" - RSpec.describe NotificationMailer, type: :mailer do let(:user) { create(:user) } let(:procedure) { create(:simple_procedure) } diff --git a/spec/mailers/user_mailer_spec.rb b/spec/mailers/user_mailer_spec.rb index 6f14cfbfb..651dcc4e8 100644 --- a/spec/mailers/user_mailer_spec.rb +++ b/spec/mailers/user_mailer_spec.rb @@ -1,5 +1,3 @@ -require "rails_helper" - RSpec.describe UserMailer, type: :mailer do let(:user) { build(:user) } diff --git a/spec/middlewares/rack_attack_spec.rb b/spec/middlewares/rack_attack_spec.rb index 1ec71cd96..0a33cce5e 100644 --- a/spec/middlewares/rack_attack_spec.rb +++ b/spec/middlewares/rack_attack_spec.rb @@ -1,5 +1,3 @@ -require "rails_helper" - describe Rack::Attack, type: :request do let(:limit) { 5 } let(:period) { 20 } diff --git a/spec/models/administrateur_spec.rb b/spec/models/administrateur_spec.rb index f7581dc15..c1e4e3320 100644 --- a/spec/models/administrateur_spec.rb +++ b/spec/models/administrateur_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Administrateur, type: :model do let(:administration) { create(:administration) } diff --git a/spec/models/administration_spec.rb b/spec/models/administration_spec.rb index 6a8f1c35c..a2a5e8e29 100644 --- a/spec/models/administration_spec.rb +++ b/spec/models/administration_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Administration, type: :model do describe '#invite_admin' do let(:administration) { create :administration } diff --git a/spec/models/avis_spec.rb b/spec/models/avis_spec.rb index 74fb242e7..aabe056a2 100644 --- a/spec/models/avis_spec.rb +++ b/spec/models/avis_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - RSpec.describe Avis, type: :model do let(:claimant) { create(:instructeur) } diff --git a/spec/models/bill_signature_spec.rb b/spec/models/bill_signature_spec.rb index 30157cbfe..2fdb83d36 100644 --- a/spec/models/bill_signature_spec.rb +++ b/spec/models/bill_signature_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - RSpec.describe BillSignature, type: :model do describe 'validations' do subject(:bill_signature) { BillSignature.new } diff --git a/spec/models/champ_private_spec.rb b/spec/models/champ_private_spec.rb index c6f60362a..daa22b943 100644 --- a/spec/models/champ_private_spec.rb +++ b/spec/models/champ_private_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Champ do describe '#private?' do let(:type_de_champ) { build(:type_de_champ, :private) } diff --git a/spec/models/champ_spec.rb b/spec/models/champ_spec.rb index c96f5e5d9..8d4c6b0af 100644 --- a/spec/models/champ_spec.rb +++ b/spec/models/champ_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Champ do require 'models/champ_shared_example.rb' diff --git a/spec/models/champs/carte_champ_spec.rb b/spec/models/champs/carte_champ_spec.rb index 6beed9886..4de97465c 100644 --- a/spec/models/champs/carte_champ_spec.rb +++ b/spec/models/champs/carte_champ_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Champs::CarteChamp do let(:champ) { Champs::CarteChamp.new(value: value) } let(:value) { '' } diff --git a/spec/models/champs/checkbox_champ_spec.rb b/spec/models/champs/checkbox_champ_spec.rb index 9db8e9c15..cb431e6dd 100644 --- a/spec/models/champs/checkbox_champ_spec.rb +++ b/spec/models/champs/checkbox_champ_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Champs::CheckboxChamp do let(:checkbox) { Champs::CheckboxChamp.new(value: value) } diff --git a/spec/models/champs/decimal_number_champ_spec.rb b/spec/models/champs/decimal_number_champ_spec.rb index 7cc511b82..3684beeec 100644 --- a/spec/models/champs/decimal_number_champ_spec.rb +++ b/spec/models/champs/decimal_number_champ_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Champs::DecimalNumberChamp do subject { build(:champ_decimal_number, value: value).tap(&:valid?) } diff --git a/spec/models/champs/header_section_champ_spec.rb b/spec/models/champs/header_section_champ_spec.rb index 281d08f20..2e604bb5c 100644 --- a/spec/models/champs/header_section_champ_spec.rb +++ b/spec/models/champs/header_section_champ_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Champs::HeaderSectionChamp do describe '#section_index' do let(:types_de_champ) do diff --git a/spec/models/champs/integer_number_champ_spec.rb b/spec/models/champs/integer_number_champ_spec.rb index c61b25576..d7cb82569 100644 --- a/spec/models/champs/integer_number_champ_spec.rb +++ b/spec/models/champs/integer_number_champ_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Champs::IntegerNumberChamp do subject { build(:champ_integer_number, value: value).tap(&:valid?) } diff --git a/spec/models/champs/linked_drop_down_list_champ_spec.rb b/spec/models/champs/linked_drop_down_list_champ_spec.rb index 204015030..a148f7371 100644 --- a/spec/models/champs/linked_drop_down_list_champ_spec.rb +++ b/spec/models/champs/linked_drop_down_list_champ_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Champs::LinkedDropDownListChamp do describe '#unpack_value' do let(:champ) { described_class.new(value: '["tata", "tutu"]') } diff --git a/spec/models/commentaire_spec.rb b/spec/models/commentaire_spec.rb index cbce20d7f..703a0def4 100644 --- a/spec/models/commentaire_spec.rb +++ b/spec/models/commentaire_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Commentaire do it { is_expected.to have_db_column(:email) } it { is_expected.to have_db_column(:body) } diff --git a/spec/models/concern/mail_template_concern_spec.rb b/spec/models/concern/mail_template_concern_spec.rb index 18deda804..fb9066c83 100644 --- a/spec/models/concern/mail_template_concern_spec.rb +++ b/spec/models/concern/mail_template_concern_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe MailTemplateConcern do let(:procedure) { create(:procedure) } let(:dossier) { create(:dossier, procedure: procedure) } diff --git a/spec/models/dossier_spec.rb b/spec/models/dossier_spec.rb index a003a56bc..2dab785b3 100644 --- a/spec/models/dossier_spec.rb +++ b/spec/models/dossier_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - describe Dossier do include ActiveJob::TestHelper diff --git a/spec/models/drop_down_list_spec.rb b/spec/models/drop_down_list_spec.rb index 7af28b927..45f31ab1d 100644 --- a/spec/models/drop_down_list_spec.rb +++ b/spec/models/drop_down_list_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe DropDownList do let(:dropdownlist) { create :drop_down_list, value: value } diff --git a/spec/models/etablissement_spec.rb b/spec/models/etablissement_spec.rb index bdfc65650..31ae4acef 100644 --- a/spec/models/etablissement_spec.rb +++ b/spec/models/etablissement_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Etablissement do describe '#geo_adresse' do let(:etablissement) { create(:etablissement) } diff --git a/spec/models/exercice_spec.rb b/spec/models/exercice_spec.rb index 9a906ed7a..8ecd6f349 100644 --- a/spec/models/exercice_spec.rb +++ b/spec/models/exercice_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Exercice do describe 'validations' do it { is_expected.to validate_presence_of(:ca) } diff --git a/spec/models/export_spec.rb b/spec/models/export_spec.rb index a3c75c577..f483dfb88 100644 --- a/spec/models/export_spec.rb +++ b/spec/models/export_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - RSpec.describe Export, type: :model do describe 'validations' do let(:groupe_instructeur) { create(:groupe_instructeur) } diff --git a/spec/models/france_connect_information_spec.rb b/spec/models/france_connect_information_spec.rb index 96413d621..1abc85a30 100644 --- a/spec/models/france_connect_information_spec.rb +++ b/spec/models/france_connect_information_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe FranceConnectInformation, type: :model do describe 'validation' do context 'france_connect_particulier_id' do diff --git a/spec/models/france_connect_particulier_client_spec.rb b/spec/models/france_connect_particulier_client_spec.rb index ec7550d60..6afce5d7b 100644 --- a/spec/models/france_connect_particulier_client_spec.rb +++ b/spec/models/france_connect_particulier_client_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe FranceConnectParticulierClient do describe '#initialize' do subject { FranceConnectParticulierClient.new(code) } diff --git a/spec/models/groupe_instructeur_spec.rb b/spec/models/groupe_instructeur_spec.rb index 4a3b3ce62..6dc6d753d 100644 --- a/spec/models/groupe_instructeur_spec.rb +++ b/spec/models/groupe_instructeur_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe GroupeInstructeur, type: :model do let(:procedure) { create(:procedure) } subject { GroupeInstructeur.new(label: label, procedure: procedure) } diff --git a/spec/models/individual_spec.rb b/spec/models/individual_spec.rb index 41c7b5a2f..b678adb49 100644 --- a/spec/models/individual_spec.rb +++ b/spec/models/individual_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Individual do it { is_expected.to have_db_column(:gender) } it { is_expected.to have_db_column(:nom) } diff --git a/spec/models/instructeur_spec.rb b/spec/models/instructeur_spec.rb index e6de354c2..cdef3e0d9 100644 --- a/spec/models/instructeur_spec.rb +++ b/spec/models/instructeur_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Instructeur, type: :model do let(:admin) { create :administrateur } let!(:procedure) { create :procedure, :published, administrateur: admin } diff --git a/spec/models/invite_spec.rb b/spec/models/invite_spec.rb index 83e61935b..f6cefcecb 100644 --- a/spec/models/invite_spec.rb +++ b/spec/models/invite_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Invite do describe 'an email can be used for multiple dossier' do let(:email1) { 'plop@octo.com' } diff --git a/spec/models/procedure_overview_spec.rb b/spec/models/procedure_overview_spec.rb index 62f571e67..90815a81d 100644 --- a/spec/models/procedure_overview_spec.rb +++ b/spec/models/procedure_overview_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe ProcedureOverview, type: :model do let(:procedure) { create(:procedure, libelle: 'libelle') } let(:friday) { Time.zone.local(2017, 5, 12) } # vendredi 12 mai 2017, de la semaine du 8 mai diff --git a/spec/models/procedure_presentation_spec.rb b/spec/models/procedure_presentation_spec.rb index d3985de74..cd05ba558 100644 --- a/spec/models/procedure_presentation_spec.rb +++ b/spec/models/procedure_presentation_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe ProcedurePresentation do let(:procedure) { create(:procedure, :with_type_de_champ, :with_type_de_champ_private) } let(:assign_to) { create(:assign_to, procedure: procedure) } diff --git a/spec/models/procedure_spec.rb b/spec/models/procedure_spec.rb index 0d3b220df..f3dc93006 100644 --- a/spec/models/procedure_spec.rb +++ b/spec/models/procedure_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Procedure do describe 'mail templates' do subject { create(:procedure) } diff --git a/spec/models/siret_spec.rb b/spec/models/siret_spec.rb index 579c2b916..525be1bb2 100644 --- a/spec/models/siret_spec.rb +++ b/spec/models/siret_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe Siret, type: :model do subject { Siret.new(siret: siret) } diff --git a/spec/models/type_de_champ_private_spec.rb b/spec/models/type_de_champ_private_spec.rb index 161897d8e..d2520bc2a 100644 --- a/spec/models/type_de_champ_private_spec.rb +++ b/spec/models/type_de_champ_private_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe TypeDeChamp do describe '#private?' do let(:type_de_champ) { build(:type_de_champ, :private) } diff --git a/spec/models/type_de_champ_spec.rb b/spec/models/type_de_champ_spec.rb index dda8fea66..a1d3ff9fc 100644 --- a/spec/models/type_de_champ_spec.rb +++ b/spec/models/type_de_champ_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe TypeDeChamp do require 'models/type_de_champ_shared_example' diff --git a/spec/models/types_de_champ/linked_drop_down_list_type_de_champ_spec.rb b/spec/models/types_de_champ/linked_drop_down_list_type_de_champ_spec.rb index 18c551bd4..de7323727 100644 --- a/spec/models/types_de_champ/linked_drop_down_list_type_de_champ_spec.rb +++ b/spec/models/types_de_champ/linked_drop_down_list_type_de_champ_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe TypesDeChamp::LinkedDropDownListTypeDeChamp do let(:drop_down_list) { build(:drop_down_list, value: menu_options) } let(:type_de_champ) { build(:type_de_champ_linked_drop_down_list, drop_down_list: drop_down_list) } diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index a0d31295f..323ecf2ca 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe User, type: :model do describe '#after_confirmation' do let(:email) { 'mail@beta.gouv.fr' } diff --git a/spec/policies/champ_policy_spec.rb b/spec/policies/champ_policy_spec.rb index 441133bb7..b8e890577 100644 --- a/spec/policies/champ_policy_spec.rb +++ b/spec/policies/champ_policy_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe ChampPolicy do let(:champ) { create(:champ_text, private: private, dossier: dossier) } let(:dossier) { create(:dossier, user: dossier_owner) } diff --git a/spec/policies/type_de_champ_policy_spec.rb b/spec/policies/type_de_champ_policy_spec.rb index e16491f37..7193aa3b5 100644 --- a/spec/policies/type_de_champ_policy_spec.rb +++ b/spec/policies/type_de_champ_policy_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe TypeDeChampPolicy do let(:procedure) { create(:procedure) } let!(:type_de_champ) { create(:type_de_champ_text, procedure: procedure) } diff --git a/spec/rails_helper.rb b/spec/rails_helper.rb index da5f1b49d..3d8f88719 100644 --- a/spec/rails_helper.rb +++ b/spec/rails_helper.rb @@ -1,7 +1,11 @@ # This file is copied to spec/ when you run 'rails generate rspec:install' +# The generated `.rspec` file contains `--require rails_helper` which will cause +# this file to always be loaded, without a need to explicitly require it in any +# files. + ENV['RAILS_ENV'] ||= 'test' -require 'spec_helper' require File.expand_path('../config/environment', __dir__) +require 'spec_helper' require 'rspec/rails' # Add additional requires below this line. Rails is not loaded until this point! @@ -20,6 +24,8 @@ require 'rspec/rails' # # Dir[Rails.root.join('spec/support/**/*.rb')].each { |f| require f } +ActiveSupport::Deprecation.silenced = true + # Checks for pending migrations before tests are run. # If you are not using ActiveRecord, you can remove this line. ActiveRecord::Migration.maintain_test_schema! @@ -27,6 +33,11 @@ ActiveRecord::Migration.maintain_test_schema! ActiveJob::Base.queue_adapter = :test RSpec.configure do |config| + # Since rspec 3.8.0, bisect uses fork to improve bisection speed. + # This however fails as soon as we're running feature tests (which uses many processes). + # Default to the :shell bisect runner, so that bisecting over feature tests works. + config.bisect_runner = :shell + # Remove this line if you're not using ActiveRecord or ActiveRecord fixtures config.fixture_path = "#{::Rails.root}/spec/fixtures" @@ -49,4 +60,11 @@ RSpec.configure do |config| # The different available types are documented in the features, such as in # https://relishapp.com/rspec/rspec-rails/docs config.infer_spec_type_from_file_location! + + config.infer_base_class_for_anonymous_controllers = false + + config.include Shoulda::Matchers::ActiveRecord, type: :model + config.include Shoulda::Matchers::ActiveModel, type: :model + config.include Devise::Test::ControllerHelpers, type: :controller + config.include Devise::Test::ControllerHelpers, type: :view end diff --git a/spec/services/administrateur_usage_statistics_service_spec.rb b/spec/services/administrateur_usage_statistics_service_spec.rb index 60de16d5e..c40e33267 100644 --- a/spec/services/administrateur_usage_statistics_service_spec.rb +++ b/spec/services/administrateur_usage_statistics_service_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe AdministrateurUsageStatisticsService do describe '#administrateur_stats' do let(:service) { AdministrateurUsageStatisticsService.new } diff --git a/spec/services/api_entreprise_service_spec.rb b/spec/services/api_entreprise_service_spec.rb index 192f16400..887333b33 100644 --- a/spec/services/api_entreprise_service_spec.rb +++ b/spec/services/api_entreprise_service_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe ApiEntrepriseService do describe '#get_etablissement_params_for_siret' do before do diff --git a/spec/services/bill_signature_service_spec.rb b/spec/services/bill_signature_service_spec.rb index a6192c913..626726676 100644 --- a/spec/services/bill_signature_service_spec.rb +++ b/spec/services/bill_signature_service_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe BillSignatureService do describe ".grouped_unsigned_operation_until" do subject { BillSignatureService.grouped_unsigned_operation_until(date).length } diff --git a/spec/services/clamav_service_spec.rb b/spec/services/clamav_service_spec.rb index 4f843e620..2341f2229 100644 --- a/spec/services/clamav_service_spec.rb +++ b/spec/services/clamav_service_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe ClamavService do describe '.safe_file?' do let(:path_file) { '/tmp/plop.txt' } diff --git a/spec/services/commentaire_service_spec.rb b/spec/services/commentaire_service_spec.rb index 5ab383243..1a0290ac4 100644 --- a/spec/services/commentaire_service_spec.rb +++ b/spec/services/commentaire_service_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe CommentaireService do include ActiveJob::TestHelper diff --git a/spec/services/dossier_search_service_spec.rb b/spec/services/dossier_search_service_spec.rb index 248b84e2e..277241445 100644 --- a/spec/services/dossier_search_service_spec.rb +++ b/spec/services/dossier_search_service_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe DossierSearchService do describe '#matching_dossiers_for_instructeur' do subject { liste_dossiers } diff --git a/spec/services/expired_dossiers_deletion_service_spec.rb b/spec/services/expired_dossiers_deletion_service_spec.rb index b4ac30b4e..38e241812 100644 --- a/spec/services/expired_dossiers_deletion_service_spec.rb +++ b/spec/services/expired_dossiers_deletion_service_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe ExpiredDossiersDeletionService do describe '#process_expired_dossiers_brouillon' do let(:draft_expiration) { 1.month + 5.days } diff --git a/spec/services/france_connect_service_spec.rb b/spec/services/france_connect_service_spec.rb index 561c0740d..80a611a66 100644 --- a/spec/services/france_connect_service_spec.rb +++ b/spec/services/france_connect_service_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe FranceConnectService do describe '.retrieve_user_informations_particulier' do let(:code) { 'plop' } diff --git a/spec/services/geojson_service_spec.rb b/spec/services/geojson_service_spec.rb index 8887d27d0..bcd9fdea3 100644 --- a/spec/services/geojson_service_spec.rb +++ b/spec/services/geojson_service_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe GeojsonService do let(:good_coordinates) { [ diff --git a/spec/services/ip_service_spec.rb b/spec/services/ip_service_spec.rb index 48d1c59e7..c00729bab 100644 --- a/spec/services/ip_service_spec.rb +++ b/spec/services/ip_service_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe IPService do describe '.ip_trusted?' do after(:each) { ENV['TRUSTED_NETWORKS'] = nil } diff --git a/spec/services/procedure_export_service_spec.rb b/spec/services/procedure_export_service_spec.rb index e54287316..1b6f87a04 100644 --- a/spec/services/procedure_export_service_spec.rb +++ b/spec/services/procedure_export_service_spec.rb @@ -1,4 +1,3 @@ -require 'spec_helper' require 'csv' describe ProcedureExportService do diff --git a/spec/services/render_partial_service_spec.rb b/spec/services/render_partial_service_spec.rb index fa5306e61..cc0df90b9 100644 --- a/spec/services/render_partial_service_spec.rb +++ b/spec/services/render_partial_service_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe RenderPartialService do let(:service) { RenderPartialService.new(controller, method) } let(:controller) { ApplicationController } diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 97fca6426..0960a07c1 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -1,7 +1,7 @@ # This file was generated by the `rails generate rspec:install` command. Conventionally, all # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`. -# The generated `.rspec` file contains `--require spec_helper` which will cause -# this file to always be loaded, without a need to explicitly require it in any +# The `.rspec` file contains `--require rails_helper`, which requires spec_helper.rb, +# causing this file to always be loaded, without a need to explicitly require it in any # files. # # Given that it is always loaded, you are encouraged to keep this file as @@ -17,10 +17,7 @@ # # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration -ENV['RAILS_ENV'] ||= 'test' - -require File.expand_path('../config/environment', __dir__) -require 'rspec/rails' +require 'rspec' require 'capybara/rspec' require 'capybara-screenshot/rspec' require 'capybara/email/rspec' @@ -76,8 +73,6 @@ Dir[Rails.root.join('spec', 'factories', '**', '*.rb')].each { |f| require f } # If you are not using ActiveRecord, you can remove this line. ActiveRecord::Migration.check_pending! if defined?(ActiveRecord::Migration) -ActiveSupport::Deprecation.silenced = true - VCR.configure do |c| c.ignore_localhost = true c.hook_into :webmock @@ -109,22 +104,8 @@ WebMock.disable_net_connect!(allow_localhost: true) RSpec.configure do |config| config.filter_run_excluding disable: true config.color = true - config.infer_spec_type_from_file_location! config.tty = true - # Since rspec 3.8.0, bisect uses fork to improve bisection speed. - # This however fails as soon as we're running feature tests (which uses many processes). - # Default to the :shell bisect runner, so that bisecting over feature tests works. - config.bisect_runner = :shell - - config.include Shoulda::Matchers::ActiveRecord, type: :model - config.include Shoulda::Matchers::ActiveModel, type: :model - config.include Shoulda::Matchers::Independent, type: :model - - config.use_transactional_fixtures = false - - config.infer_base_class_for_anonymous_controllers = false - config.run_all_when_everything_filtered = true config.filter_run :focus => true @@ -133,9 +114,6 @@ RSpec.configure do |config| # See https://github.com/rails/spring/issues/113 config.seed = srand % 0xFFFF unless ARGV.any? { |arg| arg =~ /seed/ || arg =~ /rand:/ } - config.include Devise::Test::ControllerHelpers, type: :controller - config.include Devise::Test::ControllerHelpers, type: :view - config.include FactoryBot::Syntax::Methods config.before(:each) do diff --git a/spec/support/shared_exemples_for_dossier.rb b/spec/support/shared_exemples_for_dossier.rb index a985e6aed..827d73b29 100644 --- a/spec/support/shared_exemples_for_dossier.rb +++ b/spec/support/shared_exemples_for_dossier.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - RSpec.shared_examples 'not owner of dossier' do |controller, redirect| let(:dossier_2) { create(:dossier) } diff --git a/spec/views/admin/_closed_mail_template_attestation_inconsistency_alert.html.haml_spec.rb b/spec/views/admin/_closed_mail_template_attestation_inconsistency_alert.html.haml_spec.rb index dfa51916f..642952738 100644 --- a/spec/views/admin/_closed_mail_template_attestation_inconsistency_alert.html.haml_spec.rb +++ b/spec/views/admin/_closed_mail_template_attestation_inconsistency_alert.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'admin/_closed_mail_template_attestation_inconsistency_alert.html.haml', type: :view do let(:procedure) { create(:procedure, closed_mail: closed_mail) } diff --git a/spec/views/admin/assigns/show.html.haml_spec.rb b/spec/views/admin/assigns/show.html.haml_spec.rb index 7ce691f77..382a9bdc4 100644 --- a/spec/views/admin/assigns/show.html.haml_spec.rb +++ b/spec/views/admin/assigns/show.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'admin/assigns/show.html.haml', type: :view do let(:admin) { create(:administrateur) } let(:procedure) { create :procedure, administrateur: admin } diff --git a/spec/views/admin/instructeurs/index.html.haml_spec.rb b/spec/views/admin/instructeurs/index.html.haml_spec.rb index f40405451..96d3c4c91 100644 --- a/spec/views/admin/instructeurs/index.html.haml_spec.rb +++ b/spec/views/admin/instructeurs/index.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'admin/instructeurs/index.html.haml', type: :view do let(:admin) { create(:administrateur) } diff --git a/spec/views/admin/mail_templates/edit.html.haml_spec.rb b/spec/views/admin/mail_templates/edit.html.haml_spec.rb index a381a79d9..e67d29681 100644 --- a/spec/views/admin/mail_templates/edit.html.haml_spec.rb +++ b/spec/views/admin/mail_templates/edit.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'admin/mail_templates/edit.html.haml', type: :view do let(:procedure) { create(:procedure) } let(:mail_template) { create(:received_mail, procedure: procedure) } diff --git a/spec/views/admin/procedures/show.html.haml_spec.rb b/spec/views/admin/procedures/show.html.haml_spec.rb index fe2b44b0d..15d179de5 100644 --- a/spec/views/admin/procedures/show.html.haml_spec.rb +++ b/spec/views/admin/procedures/show.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'admin/procedures/show.html.haml', type: :view do let(:closed_at) { nil } let(:procedure) { create(:procedure, :with_service, closed_at: closed_at) } diff --git a/spec/views/commencer/show.html.haml_spec.rb b/spec/views/commencer/show.html.haml_spec.rb index 3d758d664..faedd3bcf 100644 --- a/spec/views/commencer/show.html.haml_spec.rb +++ b/spec/views/commencer/show.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - RSpec.describe 'commencer/show.html.haml', type: :view do include Rails.application.routes.url_helpers diff --git a/spec/views/instructeur/dossiers/_state_button.html.haml_spec.rb b/spec/views/instructeur/dossiers/_state_button.html.haml_spec.rb index 1ee153818..e320d2464 100644 --- a/spec/views/instructeur/dossiers/_state_button.html.haml_spec.rb +++ b/spec/views/instructeur/dossiers/_state_button.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'instructeurs/dossiers/state_button.html.haml', type: :view do include DossierHelper diff --git a/spec/views/instructeur/shared/avis/list.html.haml_spec.rb b/spec/views/instructeur/shared/avis/list.html.haml_spec.rb index 155acba31..507cbf222 100644 --- a/spec/views/instructeur/shared/avis/list.html.haml_spec.rb +++ b/spec/views/instructeur/shared/avis/list.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'instructeurs/shared/avis/_list.html.haml', type: :view do before { view.extend DossierHelper } diff --git a/spec/views/instructeur_mailer/send_notifications.html.haml_spec.rb b/spec/views/instructeur_mailer/send_notifications.html.haml_spec.rb index 82575aae8..c32a37d58 100644 --- a/spec/views/instructeur_mailer/send_notifications.html.haml_spec.rb +++ b/spec/views/instructeur_mailer/send_notifications.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - describe 'instructeur_mailer/send_notifications.html.haml', type: :view do let(:instructeur) { create(:instructeur) } diff --git a/spec/views/layouts/_navbar_spec.rb b/spec/views/layouts/_navbar_spec.rb index 968aead0f..d25251c50 100644 --- a/spec/views/layouts/_navbar_spec.rb +++ b/spec/views/layouts/_navbar_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'layouts/_navbar.html.haml', type: :view do let(:administrateur) { create(:administrateur) } let(:instructeur) { create(:instructeur, administrateurs: [administrateur]) } diff --git a/spec/views/layouts/_new_header_spec.rb b/spec/views/layouts/_new_header_spec.rb index 8d896f517..89d77119e 100644 --- a/spec/views/layouts/_new_header_spec.rb +++ b/spec/views/layouts/_new_header_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'layouts/_new_header.html.haml', type: :view do let(:current_instructeur) { nil } diff --git a/spec/views/layouts/procedure_context.html.haml_spec.rb b/spec/views/layouts/procedure_context.html.haml_spec.rb index 617654577..786ab24cd 100644 --- a/spec/views/layouts/procedure_context.html.haml_spec.rb +++ b/spec/views/layouts/procedure_context.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - describe 'layouts/procedure_context.html.haml', type: :view do let(:procedure) { create(:simple_procedure, :with_service) } let(:dossier) { create(:dossier, procedure: procedure) } diff --git a/spec/views/new_administrateur/procedures/edit.html.haml_spec.rb b/spec/views/new_administrateur/procedures/edit.html.haml_spec.rb index 89ed5339b..2f9c83785 100644 --- a/spec/views/new_administrateur/procedures/edit.html.haml_spec.rb +++ b/spec/views/new_administrateur/procedures/edit.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'new_administrateur/procedures/edit.html.haml' do let(:logo) { Rack::Test::UploadedFile.new("./spec/fixtures/files/logo_test_procedure.png", 'image/png') } let(:procedure) { create(:procedure, logo: logo, lien_site_web: 'http://some.website') } diff --git a/spec/views/shared/attachment/_show.html.haml_spec.rb b/spec/views/shared/attachment/_show.html.haml_spec.rb index 81cf9024d..0cbd1bae5 100644 --- a/spec/views/shared/attachment/_show.html.haml_spec.rb +++ b/spec/views/shared/attachment/_show.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - describe 'shared/attachment/_show.html.haml', type: :view do let(:champ) { create(:champ_piece_justificative) } let(:virus_scan_result) { nil } diff --git a/spec/views/shared/attachment/_update.html.haml_spec.rb b/spec/views/shared/attachment/_update.html.haml_spec.rb index a98a30b0a..a53a22856 100644 --- a/spec/views/shared/attachment/_update.html.haml_spec.rb +++ b/spec/views/shared/attachment/_update.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'rails_helper' - describe 'shared/attachment/_update.html.haml', type: :view do let(:champ) { build(:champ_piece_justificative, dossier: create(:dossier)) } let(:attached_file) { champ.piece_justificative_file } diff --git a/spec/views/users/dossiers/brouillon.html.haml_spec.rb b/spec/views/users/dossiers/brouillon.html.haml_spec.rb index 1d66d554f..83a15da28 100644 --- a/spec/views/users/dossiers/brouillon.html.haml_spec.rb +++ b/spec/views/users/dossiers/brouillon.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'users/dossiers/brouillon.html.haml', type: :view do let(:procedure) { create(:procedure, :with_type_de_champ, :with_notice, :with_service) } let(:dossier) { create(:dossier, state: Dossier.states.fetch(:brouillon), procedure: procedure) } diff --git a/spec/views/users/dossiers/demande.html.haml_spec.rb b/spec/views/users/dossiers/demande.html.haml_spec.rb index b48a3e5ae..0a46903d4 100644 --- a/spec/views/users/dossiers/demande.html.haml_spec.rb +++ b/spec/views/users/dossiers/demande.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'users/dossiers/demande.html.haml', type: :view do let(:procedure) { create(:procedure, :published, :with_type_de_champ, :with_type_de_champ_private) } let(:dossier) { create(:dossier, :en_construction, :with_entreprise, procedure: procedure) } diff --git a/spec/views/users/dossiers/etablissement.html.haml_spec.rb b/spec/views/users/dossiers/etablissement.html.haml_spec.rb index 7f74e05f1..a7d2cc3d7 100644 --- a/spec/views/users/dossiers/etablissement.html.haml_spec.rb +++ b/spec/views/users/dossiers/etablissement.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'users/dossiers/etablissement.html.haml', type: :view do let(:etablissement) { create(:etablissement, :with_exercices) } let(:dossier) { create(:dossier, etablissement: etablissement) } diff --git a/spec/views/users/dossiers/identite.html.haml_spec.rb b/spec/views/users/dossiers/identite.html.haml_spec.rb index 2f01ef41c..62d685dec 100644 --- a/spec/views/users/dossiers/identite.html.haml_spec.rb +++ b/spec/views/users/dossiers/identite.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'users/dossiers/identite.html.haml', type: :view do let(:procedure) { create(:simple_procedure, :for_individual) } let(:dossier) { create(:dossier, :with_service, state: Dossier.states.fetch(:brouillon), procedure: procedure) } diff --git a/spec/views/users/dossiers/index.html.haml_spec.rb b/spec/views/users/dossiers/index.html.haml_spec.rb index e908b5678..ff91ccce5 100644 --- a/spec/views/users/dossiers/index.html.haml_spec.rb +++ b/spec/views/users/dossiers/index.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'users/dossiers/index.html.haml', type: :view do let(:user) { create(:user) } let(:dossier_brouillon) { create(:dossier, state: Dossier.states.fetch(:brouillon), user: user) } diff --git a/spec/views/users/dossiers/show.html.haml_spec.rb b/spec/views/users/dossiers/show.html.haml_spec.rb index 30f6e8d72..821cfbb27 100644 --- a/spec/views/users/dossiers/show.html.haml_spec.rb +++ b/spec/views/users/dossiers/show.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'users/dossiers/show.html.haml', type: :view do let(:dossier) { create(:dossier, :en_construction) } diff --git a/spec/views/users/dossiers/siret.html.haml_spec.rb b/spec/views/users/dossiers/siret.html.haml_spec.rb index 23890b1e7..e1068ef30 100644 --- a/spec/views/users/dossiers/siret.html.haml_spec.rb +++ b/spec/views/users/dossiers/siret.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'users/dossiers/siret.html.haml', type: :view do let(:dossier) { create(:dossier) } diff --git a/spec/views/users/sessions/new.html.haml_spec.rb b/spec/views/users/sessions/new.html.haml_spec.rb index 3ffddef9f..9b3da052d 100644 --- a/spec/views/users/sessions/new.html.haml_spec.rb +++ b/spec/views/users/sessions/new.html.haml_spec.rb @@ -1,5 +1,3 @@ -require 'spec_helper' - describe 'users/sessions/new.html.haml', type: :view do let(:dossier) { create :dossier }