From 4a2035156a16292f7612a974fbc7f1aa072c96cb Mon Sep 17 00:00:00 2001 From: Aaron Patterson Date: Fri, 6 Jan 2012 17:28:19 -0800 Subject: spec class names can possibly be nil in mt/s < 2.6.1, so work around that --- activesupport/lib/active_support/test_case.rb | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'activesupport/lib') diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb index a7d9c84387..4169557286 100644 --- a/activesupport/lib/active_support/test_case.rb +++ b/activesupport/lib/active_support/test_case.rb @@ -11,6 +11,12 @@ require 'active_support/core_ext/kernel/reporting' module ActiveSupport class TestCase < ::MiniTest::Spec + if MiniTest::Unit::VERSION < '2.6.1' + class << self + alias :name :to_s + end + end + # Use AS::TestCase for the base class when describing a model register_spec_type(self) do |desc| desc < ActiveRecord::Model -- cgit v1.2.3