tests: factor out assert_downloaded to DownloadTestHelper.

This commit is contained in:
evazion
2017-06-21 11:02:33 -05:00
parent 73f479e240
commit 5684ba3b1d
3 changed files with 32 additions and 34 deletions

View File

@@ -11,9 +11,9 @@ end
require File.expand_path('../../config/environment', __FILE__)
require 'rails/test_help'
require 'cache'
require 'helpers/post_archive_test_helper'
Dir[File.expand_path(File.dirname(__FILE__) + "/factories/*.rb")].each {|file| require file}
Dir[File.expand_path(File.dirname(__FILE__) + "/helpers/*.rb")].each {|file| require file}
Shoulda::Matchers.configure do |config|
config.integrate do |with|
@@ -23,6 +23,13 @@ end
class ActiveSupport::TestCase
include PostArchiveTestHelper
include ReportbooruHelper
include DownloadTestHelper
setup do
mock_popular_search_service!
mock_missed_search_service!
end
teardown do
Cache.clear
@@ -49,13 +56,3 @@ end
Delayed::Worker.delay_jobs = false
TestAfterCommit.enabled = false
require "helpers/reportbooru_helper"
class ActiveSupport::TestCase
include ReportbooruHelper
setup do
mock_popular_search_service!
mock_missed_search_service!
end
end