From 0df86d77fd5f57fc88cfd00a2cf2c265215a2839 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 6 Feb 2024 09:36:04 -0500 Subject: [PATCH] Reduce `RSpec/ExampleLength` in PostStatusService spec example (#29105) --- spec/services/post_status_service_spec.rb | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/spec/services/post_status_service_spec.rb b/spec/services/post_status_service_spec.rb index 1e5c420a63..d10a82607e 100644 --- a/spec/services/post_status_service_spec.rb +++ b/spec/services/post_status_service_spec.rb @@ -228,13 +228,7 @@ RSpec.describe PostStatusService, type: :service do subject.call( account, text: 'test status update', - media_ids: [ - Fabricate(:media_attachment, account: account), - Fabricate(:media_attachment, account: account), - Fabricate(:media_attachment, account: account), - Fabricate(:media_attachment, account: account), - Fabricate(:media_attachment, account: account), - ].map(&:id) + media_ids: Array.new(5) { Fabricate(:media_attachment, account: account) }.map(&:id) ) end.to raise_error( Mastodon::ValidationError,