require 'minitest/autorun' require 'minitest/spec' require 'i18n' require 'active_support/test_case' require 'action_view/test_case' require 'titlezilla' class ActiveSupport::TestCase class << self remove_method :describe end if self.respond_to? :describe extend MiniTest::Spec::DSL end class MockController < Struct.new(:action_name, :controller_path) attr_accessor :view_assigns def initialize @view_assigns = {} end end class ActionView::TestCase register_spec_type(/Helper( ?Test)?\z/i, self) setup :set_controller def set_controller @controller = MockController.new end end I18n.enforce_available_locales = false def load_translations(titles) I18n.backend.store_translations(:en, { titles: titles }) end class Minitest::Spec after do ::Titlezilla.reset_configuration I18n.reload! end end