diff options
author | Ian White <ian.w.white@gmail.com> | 2008-04-17 13:43:47 -0500 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2008-04-17 13:43:47 -0500 |
commit | 82b4faf81218bbd8916ab559590db236c7f80e46 (patch) | |
tree | e5b65fae3a5d54c93f660f2b56980acb86d5ff68 /activerecord/test/cases | |
parent | 9e1d506a8cfedef2fdd605e4cbf4bf53651ad214 (diff) | |
download | rails-82b4faf81218bbd8916ab559590db236c7f80e46.tar.gz rails-82b4faf81218bbd8916ab559590db236c7f80e46.tar.bz2 rails-82b4faf81218bbd8916ab559590db236c7f80e46.zip |
Fix migrations when migrating to a specified version number with a fresh database [#1 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r-- | activerecord/test/cases/migration_test.rb | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb index 885d89b6da..c270230d67 100644 --- a/activerecord/test/cases/migration_test.rb +++ b/activerecord/test/cases/migration_test.rb @@ -813,6 +813,13 @@ if ActiveRecord::Base.connection.supports_migrations? end end + def test_migrator_db_has_no_schema_migrations_table + ActiveRecord::Base.connection.execute("DROP TABLE schema_migrations;") + assert_nothing_raised do + ActiveRecord::Migrator.migrate(MIGRATIONS_ROOT + "/valid", 1) + end + end + def test_migrator_verbosity ActiveRecord::Migrator.up(MIGRATIONS_ROOT + "/valid", 1) assert PeopleHaveLastNames.message_count > 0 @@ -1010,7 +1017,7 @@ if ActiveRecord::Base.connection.supports_migrations? end end - + uses_mocha 'Sexy migration tests' do class SexyMigrationsTest < ActiveRecord::TestCase def test_references_column_type_adds_id |