From b83a76a0a1b35962b58c7a92ab1e130d40671c69 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Wed, 24 Jun 2020 10:50:43 +0000 Subject: [PATCH] dossier: refactor piece_justificative specs Use `eq` rather than `be` for integers. --- spec/lib/active_storage/downloadable_file_spec.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/spec/lib/active_storage/downloadable_file_spec.rb b/spec/lib/active_storage/downloadable_file_spec.rb index 8a4ab048e..509f0c2d2 100644 --- a/spec/lib/active_storage/downloadable_file_spec.rb +++ b/spec/lib/active_storage/downloadable_file_spec.rb @@ -13,7 +13,7 @@ describe ActiveStorage::DownloadableFile do dossier.champs << create(:champ, :piece_justificative, :with_piece_justificative_file) end - it { expect(list.length).to be 1 } + it { expect(list.length).to eq 1 } end context 'when there is a repetition bloc' do @@ -21,7 +21,7 @@ describe ActiveStorage::DownloadableFile do let(:dossier) { create(:dossier, :en_construction, champs: [champ]) } it 'should have 4 piece_justificatives' do - expect(list.size).to eq(4) + expect(list.size).to eq 4 end end @@ -29,14 +29,14 @@ describe ActiveStorage::DownloadableFile do let(:commentaire) { create(:commentaire) } let(:dossier) { commentaire.dossier } - it { expect(list.length).to be 0 } + it { expect(list.length).to eq 0 } end context 'when there is a message with an attachment' do let(:commentaire) { create(:commentaire, :with_file) } let(:dossier) { commentaire.dossier } - it { expect(list.length).to be 1 } + it { expect(list.length).to eq 1 } end end end