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 "action_view/testing/resolvers"
|
||||||
require "active_support/dependencies"
|
require "active_support/dependencies"
|
||||||
require "active_model"
|
require "active_model"
|
||||||
require "active_record"
|
|
||||||
|
|
||||||
ActiveSupport::Dependencies.hook!
|
ActiveSupport::Dependencies.hook!
|
||||||
|
|
||||||
@ -34,9 +33,6 @@
|
|||||||
# Disable available locale checks to avoid warnings running the test suite.
|
# Disable available locale checks to avoid warnings running the test suite.
|
||||||
I18n.enforce_available_locales = false
|
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
|
ORIGINAL_LOCALES = I18n.available_locales.map(&:to_s).sort
|
||||||
|
|
||||||
FIXTURE_LOAD_PATH = File.expand_path("fixtures", __dir__)
|
FIXTURE_LOAD_PATH = File.expand_path("fixtures", __dir__)
|
||||||
@ -160,24 +156,6 @@ def with_routes(&block)
|
|||||||
end
|
end
|
||||||
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
|
module ActionDispatch
|
||||||
class DebugExceptions
|
class DebugExceptions
|
||||||
private
|
private
|
||||||
|
@ -2,6 +2,24 @@
|
|||||||
|
|
||||||
require "abstract_unit"
|
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
|
class UrlHelperTest < ActiveSupport::TestCase
|
||||||
# In a few cases, the helper proxies to 'controller'
|
# In a few cases, the helper proxies to 'controller'
|
||||||
# or request.
|
# or request.
|
||||||
|
Loading…
Reference in New Issue
Block a user