diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-06 17:28:19 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-06 17:28:37 -0800 |
commit | 4a2035156a16292f7612a974fbc7f1aa072c96cb (patch) | |
tree | b205e6ade9c33a5788781dd3787f4decadeab8f0 /activesupport | |
parent | fec6f1ba82145fe8e9d6258069516d600cc7ce1f (diff) | |
download | rails-4a2035156a16292f7612a974fbc7f1aa072c96cb.tar.gz rails-4a2035156a16292f7612a974fbc7f1aa072c96cb.tar.bz2 rails-4a2035156a16292f7612a974fbc7f1aa072c96cb.zip |
spec class names can possibly be nil in mt/s < 2.6.1, so work around that
Diffstat (limited to 'activesupport')
-rw-r--r-- | activesupport/lib/active_support/test_case.rb | 6 |
1 files changed, 6 insertions, 0 deletions
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 |