mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Merge pull request #25214 from maclover7/jm-av-tests
Cleanup Action View `abstract_unit`
This commit is contained in:
commit
7c1bf1a474
2 changed files with 18 additions and 22 deletions
|
@ -22,7 +22,6 @@ require "action_view"
|
|||
require "action_view/testing/resolvers"
|
||||
require "active_support/dependencies"
|
||||
require "active_model"
|
||||
require "active_record"
|
||||
|
||||
ActiveSupport::Dependencies.hook!
|
||||
|
||||
|
@ -34,9 +33,6 @@ ActiveSupport::Deprecation.debug = true
|
|||
# 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 @@ module ActionController
|
|||
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 a new issue