1
0
Fork 0
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:
Rafael Mendonça França 2019-12-18 12:23:11 -03:00
commit 7c1bf1a474
No known key found for this signature in database
GPG key ID: FC23B6D0F1EEE948
2 changed files with 18 additions and 22 deletions

View file

@ -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

View file

@ -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.