From 38c6825edaa0a8c6520b2d1720f9b369fc63cba6 Mon Sep 17 00:00:00 2001 From: Matt Jankowski Date: Tue, 18 Jun 2024 08:16:16 -0400 Subject: [PATCH] Remove unused `Extractor#extract_cashtags_with_indices` method (#30742) --- app/lib/extractor.rb | 4 ---- spec/lib/extractor_spec.rb | 6 +++--- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/app/lib/extractor.rb b/app/lib/extractor.rb index 9090773ae9..7e647a7587 100644 --- a/app/lib/extractor.rb +++ b/app/lib/extractor.rb @@ -86,10 +86,6 @@ module Extractor possible_entries end - def extract_cashtags_with_indices(_text) - [] - end - def extract_extra_uris_with_indices(text) return [] unless text&.index(':') diff --git a/spec/lib/extractor_spec.rb b/spec/lib/extractor_spec.rb index b6c910171d..af5c62d4c8 100644 --- a/spec/lib/extractor_spec.rb +++ b/spec/lib/extractor_spec.rb @@ -69,10 +69,10 @@ describe Extractor do end end - describe 'extract_cashtags_with_indices' do - it 'returns []' do + describe 'extract_entities_with_indices' do + it 'returns empty array when cashtag present' do text = '$cashtag' - extracted = described_class.extract_cashtags_with_indices(text) + extracted = described_class.extract_entities_with_indices(text) expect(extracted).to eq [] end end