diff options
author | Emilio Tagua <miloops@gmail.com> | 2009-05-18 11:18:46 -0300 |
---|---|---|
committer | Emilio Tagua <miloops@gmail.com> | 2009-05-18 11:18:46 -0300 |
commit | a04dedd5634cbb602cf48938cee0ff11c046b4c2 (patch) | |
tree | 66c51731cc283310362db57503d4952e0a0213bb /activerecord/test/cases/helper.rb | |
parent | 0048897a417774f7e5a0c8c9e82fc8684f94ebc1 (diff) | |
parent | 27de7f150b57a18d4ccdd274f6f8b621b58108c6 (diff) | |
download | rails-a04dedd5634cbb602cf48938cee0ff11c046b4c2.tar.gz rails-a04dedd5634cbb602cf48938cee0ff11c046b4c2.tar.bz2 rails-a04dedd5634cbb602cf48938cee0ff11c046b4c2.zip |
Merge commit 'rails/master'
Conflicts:
activerecord/lib/active_record/base.rb
activerecord/lib/active_record/migration.rb
activerecord/test/cases/helper.rb
Diffstat (limited to 'activerecord/test/cases/helper.rb')
-rw-r--r-- | activerecord/test/cases/helper.rb | 19 |
1 files changed, 18 insertions, 1 deletions
diff --git a/activerecord/test/cases/helper.rb b/activerecord/test/cases/helper.rb index 2b623ea703..f82784836e 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,7 +16,6 @@ require 'connection' require 'cases/repair_helper' -# Expose the debugger if available begin require 'ruby-debug' rescue LoadError @@ -73,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 |