diff options
author | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-16 11:21:20 -0800 |
---|---|---|
committer | Aaron Patterson <aaron.patterson@gmail.com> | 2012-01-16 11:21:20 -0800 |
commit | 536433845d1d13b46483beac6bb5e7ba91008d2a (patch) | |
tree | f7618c83359341c413ad84acf4e8b27495a19371 /activerecord/test | |
parent | 7312b8318f0c770d363a62d679aa8f67a18e549b (diff) | |
download | rails-536433845d1d13b46483beac6bb5e7ba91008d2a.tar.gz rails-536433845d1d13b46483beac6bb5e7ba91008d2a.tar.bz2 rails-536433845d1d13b46483beac6bb5e7ba91008d2a.zip |
silencing migrator tests, refactoring the migration test helper
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/migration/helper.rb | 9 | ||||
-rw-r--r-- | activerecord/test/cases/migration_test.rb | 23 | ||||
-rw-r--r-- | activerecord/test/cases/migrator_test.rb | 1 |
3 files changed, 11 insertions, 22 deletions
diff --git a/activerecord/test/cases/migration/helper.rb b/activerecord/test/cases/migration/helper.rb index 1a5ac1333e..fe53510ba2 100644 --- a/activerecord/test/cases/migration/helper.rb +++ b/activerecord/test/cases/migration/helper.rb @@ -2,6 +2,15 @@ require "cases/helper" module ActiveRecord class Migration + class << self + attr_accessor :message_count + end + + def puts(text="") + ActiveRecord::Migration.message_count ||= 0 + ActiveRecord::Migration.message_count += 1 + end + module TestHelper attr_reader :connection, :table_name diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index efb47b1844..9b80ea92a2 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -1,4 +1,5 @@ require "cases/helper" +require "cases/migration/helper" require 'bigdecimal/util' require 'models/person' @@ -16,28 +17,6 @@ class Reminder < ActiveRecord::Base; end class Thing < ActiveRecord::Base; end -class ActiveRecord::Migration - class << self - attr_accessor :message_count - end - - def puts(text="") - ActiveRecord::Migration.message_count ||= 0 - ActiveRecord::Migration.message_count += 1 - end -end - -module ActiveRecord - class MigrationTest < ActiveRecord::TestCase - attr_reader :connection - - def setup - super - @connection = Base.connection - end - end -end - class MigrationTest < ActiveRecord::TestCase self.use_transactional_fixtures = false diff --git a/activerecord/test/cases/migrator_test.rb b/activerecord/test/cases/migrator_test.rb index c14c485842..5553798cc7 100644 --- a/activerecord/test/cases/migrator_test.rb +++ b/activerecord/test/cases/migrator_test.rb @@ -1,4 +1,5 @@ require "cases/helper" +require "cases/migration/helper" module ActiveRecord class MigratorTest < ActiveRecord::TestCase |