Sha256: 8b8e29980c448c6942cba24852b4eb59489e412804de0a1eef5baccfc40080bd

Contents?: true

Size: 865 Bytes

Versions: 4

Compression:

Stored size: 865 Bytes

Contents

# frozen_string_literal: true

module Minitest
  module Utils
    module UrlHelpers
      include Rails.application.routes.url_helpers

      def default_url_options
        config = Rails.configuration

        Rails.application.routes.default_url_options ||
          config.action_controller.default_url_options ||
          config.action_mailer.default_url_options ||
          {}
      end
    end
  end
end

module ActiveSupport
  class TestCase
    extend Minitest::Spec::DSL if defined?(Minitest::Spec::DSL)

    require "minitest/utils/rails/capybara" if defined?(Capybara)

    def t(*args)
      I18n.t(*args)
    end

    def l(*args)
      I18n.l(*args)
    end
  end
end

module ActionController
  class TestCase
    include Minitest::Utils::UrlHelpers
  end
end

module ActionMailer
  class TestCase
    include Minitest::Utils::UrlHelpers
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
minitest-utils-0.4.8 lib/minitest/utils/rails.rb
minitest-utils-0.4.7 lib/minitest/utils/rails.rb
minitest-utils-0.4.6 lib/minitest/utils/rails.rb
minitest-utils-0.4.5 lib/minitest/utils/rails.rb