Skip to content

Commit

Permalink
Merge pull request #25214 from maclover7/jm-av-tests
Browse files Browse the repository at this point in the history
Cleanup Action View `abstract_unit`
  • Loading branch information
rafaelfranca committed Dec 18, 2019
2 parents af97b80 + e44e7b3 commit 7c1bf1a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 22 deletions.
22 changes: 0 additions & 22 deletions actionview/test/abstract_unit.rb
Expand Up @@ -22,7 +22,6 @@
require "action_view/testing/resolvers"
require "active_support/dependencies"
require "active_model"
require "active_record"

ActiveSupport::Dependencies.hook!

Expand All @@ -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__)
Expand Down Expand Up @@ -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
Expand Down
18 changes: 18 additions & 0 deletions actionview/test/template/url_helper_test.rb
Expand Up @@ -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.
Expand Down

0 comments on commit 7c1bf1a

Please sign in to comment.