tests: move test/helpers to test/test_helpers.

The Rails convention is for test/helpers to be used for testing the view
helpers in app/helpers. We were using it to store certain utility
methods instead. Move these to test/test_helpers so that test/helpers
can be used for its intended purpose.
This commit is contained in:
evazion
2018-01-14 15:03:53 -06:00
parent 7c8cfc1e31
commit 4f543671a2
24 changed files with 7 additions and 57 deletions

View File

@@ -14,7 +14,7 @@ require 'cache'
require 'webmock/minitest'
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}
Dir[File.expand_path(File.dirname(__FILE__) + "/test_helpers/*.rb")].each {|file| require file}
Shoulda::Matchers.configure do |config|
config.integrate do |with|
@@ -24,8 +24,12 @@ end
class ActiveSupport::TestCase
include PostArchiveTestHelper
include PoolArchiveTestHelper
include ReportbooruHelper
include DownloadTestHelper
include IqdbTestHelper
include SavedSearchTestHelper
include UploadTestHelper
setup do
mock_popular_search_service!
@@ -40,8 +44,6 @@ class ActiveSupport::TestCase
end
class ActionController::TestCase
include PostArchiveTestHelper
def assert_authentication_passes(action, http_method, role, params, session)
__send__(http_method, action, params, session.merge(:user_id => @users[role].id))
assert_response :success