Merge pull request #25214 from maclover7/jm-av-tests
Cleanup Action View `abstract_unit`
This commit is contained in:
commit
7c1bf1a474
@ -22,7 +22,6 @@
|
||||
require "action_view/testing/resolvers"
|
||||
require "active_support/dependencies"
|
||||
require "active_model"
|
||||
require "active_record"
|
||||
|
||||
ActiveSupport::Dependencies.hook!
|
||||
|
||||
@ -34,9 +33,6 @@
|
||||
# Disable available locale checks to avoid warnings running the test suite.
|
||||
I18n.enforce_available_locales = false
|
||||
|
||||
# Register danish language for testing
|
||||
I18n.backend.store_translations "da", {}
|
||||
I18n.backend.store_translations "pt-BR", {}
|
||||
ORIGINAL_LOCALES = I18n.available_locales.map(&:to_s).sort
|
||||
|
||||
FIXTURE_LOAD_PATH = File.expand_path("fixtures", __dir__)
|
||||
@ -160,24 +156,6 @@ def with_routes(&block)
|
||||
end
|
||||
end
|
||||
|
||||
class Workshop
|
||||
extend ActiveModel::Naming
|
||||
include ActiveModel::Conversion
|
||||
attr_accessor :id
|
||||
|
||||
def initialize(id)
|
||||
@id = id
|
||||
end
|
||||
|
||||
def persisted?
|
||||
id.present?
|
||||
end
|
||||
|
||||
def to_s
|
||||
id.to_s
|
||||
end
|
||||
end
|
||||
|
||||
module ActionDispatch
|
||||
class DebugExceptions
|
||||
private
|
||||
|
@ -2,6 +2,24 @@
|
||||
|
||||
require "abstract_unit"
|
||||
|
||||
class Workshop
|
||||
extend ActiveModel::Naming
|
||||
include ActiveModel::Conversion
|
||||
attr_accessor :id
|
||||
|
||||
def initialize(id)
|
||||
@id = id
|
||||
end
|
||||
|
||||
def persisted?
|
||||
id.present?
|
||||
end
|
||||
|
||||
def to_s
|
||||
id.to_s
|
||||
end
|
||||
end
|
||||
|
||||
class UrlHelperTest < ActiveSupport::TestCase
|
||||
# In a few cases, the helper proxies to 'controller'
|
||||
# or request.
|
||||
|
Loading…
Reference in New Issue
Block a user