aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migration
diff options
context:
space:
mode:
authorAaron Patterson <aaron.patterson@gmail.com>2012-01-11 12:01:04 -0800
committerAaron Patterson <aaron.patterson@gmail.com>2012-01-13 14:33:53 -0800
commitcc88ffed7a2e17ff53eb8796bc1fa2536ebca00d (patch)
treef7d7c6814a2e4ce4a02aa14d93911d5a2ca0903a /activerecord/test/cases/migration
parent974a6402d70fa6bb1ecfc43b4925717b474df4d0 (diff)
downloadrails-cc88ffed7a2e17ff53eb8796bc1fa2536ebca00d.tar.gz
rails-cc88ffed7a2e17ff53eb8796bc1fa2536ebca00d.tar.bz2
rails-cc88ffed7a2e17ff53eb8796bc1fa2536ebca00d.zip
remove dependency on the filesystem
Diffstat (limited to 'activerecord/test/cases/migration')
-rw-r--r--activerecord/test/cases/migration/logger_test.rb11
1 files changed, 8 insertions, 3 deletions
diff --git a/activerecord/test/cases/migration/logger_test.rb b/activerecord/test/cases/migration/logger_test.rb
index a892afda91..6ea38c2650 100644
--- a/activerecord/test/cases/migration/logger_test.rb
+++ b/activerecord/test/cases/migration/logger_test.rb
@@ -3,12 +3,17 @@ require "cases/helper"
module ActiveRecord
class Migration
class LoggerTest < ActiveRecord::TestCase
+ Migration = Struct.new(:version) do
+ def migrate direction
+ # do nothing
+ end
+ end
+
def test_migration_should_be_run_without_logger
previous_logger = ActiveRecord::Base.logger
ActiveRecord::Base.logger = nil
- assert_nothing_raised do
- ActiveRecord::Migrator.migrate(MIGRATIONS_ROOT + "/valid")
- end
+ migrations = [Migration.new(1), Migration.new(2), Migration.new(3)]
+ ActiveRecord::Migrator.new(:up, migrations).migrate
ensure
ActiveRecord::Base.logger = previous_logger
end