diff options
Diffstat (limited to 'activerecord/test/cases/helper.rb')
-rw-r--r-- | activerecord/test/cases/helper.rb | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb index a4f05f0c72..c30186286d 100644 --- a/activerecord/test/cases/helper.rb +++ b/activerecord/test/cases/helper.rb @@ -5,6 +5,7 @@ require 'config' require 'rubygems' require 'test/unit' +require 'stringio' gem 'mocha', '>= 0.9.5' require 'mocha' @@ -15,6 +16,11 @@ require 'connection' require 'cases/repair_helper' +begin + require 'ruby-debug' +rescue LoadError +end + # Show backtraces for deprecated behavior for quicker cleanup. ActiveSupport::Deprecation.debug = true @@ -67,3 +73,20 @@ class ActiveSupport::TestCase Fixtures.create_fixtures(ActiveSupport::TestCase.fixture_path, table_names, {}, &block) end end + +# silence verbose schema loading +original_stdout = $stdout +$stdout = StringIO.new + +begin + adapter_name = ActiveRecord::Base.connection.adapter_name.downcase + adapter_specific_schema_file = SCHEMA_ROOT + "/#{adapter_name}_specific_schema.rb" + + load SCHEMA_ROOT + "/schema.rb" + + if File.exists?(adapter_specific_schema_file) + load adapter_specific_schema_file + end +ensure + $stdout = original_stdout +end |