diff options
author | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-07 00:58:49 -0300 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2015-01-07 00:58:49 -0300 |
commit | 8f92edb2b4b6beb5c778283be7cbcef6bf7e596c (patch) | |
tree | d23e49209f81db38813c6cb0a8243a3a94bf882d /activesupport/lib/active_support/test_case.rb | |
parent | 292f6c99229f34ab216ddc9103e219143e637d85 (diff) | |
download | rails-8f92edb2b4b6beb5c778283be7cbcef6bf7e596c.tar.gz rails-8f92edb2b4b6beb5c778283be7cbcef6bf7e596c.tar.bz2 rails-8f92edb2b4b6beb5c778283be7cbcef6bf7e596c.zip |
Remove hard dependency on test-unit
Instead show a error message asking users to add the gem to their
Gemfile if test-unit could not be loaded.
Diffstat (limited to 'activesupport/lib/active_support/test_case.rb')
-rw-r--r-- | activesupport/lib/active_support/test_case.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/activesupport/lib/active_support/test_case.rb b/activesupport/lib/active_support/test_case.rb index 573736ede7..f0f83a747c 100644 --- a/activesupport/lib/active_support/test_case.rb +++ b/activesupport/lib/active_support/test_case.rb @@ -1,4 +1,8 @@ -require 'test/unit/testcase' +begin + require 'test/unit/testcase' +rescue LoadError => e + raise LoadError, "Please add test-unit gem to your Gemfile: `gem 'test-unit', '~> 3.0'` (#{e.message})", e.backtrace +end require 'active_support/testing/setup_and_teardown' require 'active_support/testing/assertions' require 'active_support/testing/deprecation' |