sources: rename Sources::Strategies to Source::Extractor.
Rename Sources::Strategies to Source::Extractor. A Source::Extractor represents a thing that extracts information from a given URL.
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
module DownloadTestHelper
|
||||
def assert_downloaded(expected_filesize, source, referer = nil)
|
||||
strategy = Sources::Strategies.find(source, referer)
|
||||
strategy = Source::Extractor.find(source, referer)
|
||||
file = strategy.download_file!(strategy.image_urls.sole)
|
||||
assert_equal(expected_filesize, file.size, "Tested source URL: #{source}")
|
||||
end
|
||||
|
||||
def assert_rewritten(expected_source, test_source, test_referer = nil)
|
||||
strategy = Sources::Strategies.find(test_source, test_referer)
|
||||
strategy = Source::Extractor.find(test_source, test_referer)
|
||||
rewritten_source = strategy.image_urls.sole
|
||||
assert_match(expected_source, rewritten_source, "Tested source URL: #{test_source}")
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user