diff options
author | Josh Susser <josh@hasmanythrough.com> | 2010-03-20 19:46:17 -0700 |
---|---|---|
committer | Josh Susser <josh@hasmanythrough.com> | 2010-12-01 11:01:15 -0800 |
commit | b07c2c0fd3130bb69cf8d846e46762a7c3972107 (patch) | |
tree | 15d8dd984efc7d986d98641bf6a73973c2405ea9 /activerecord/test | |
parent | 7139aa878ceea8dd17a60955cd4d07f5f68980d9 (diff) | |
download | rails-b07c2c0fd3130bb69cf8d846e46762a7c3972107.tar.gz rails-b07c2c0fd3130bb69cf8d846e46762a7c3972107.tar.bz2 rails-b07c2c0fd3130bb69cf8d846e46762a7c3972107.zip |
clear schema_migrations in Schema.define
Diffstat (limited to 'activerecord/test')
-rw-r--r-- | activerecord/test/cases/ar_schema_test.rb | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/activerecord/test/cases/ar_schema_test.rb b/activerecord/test/cases/ar_schema_test.rb index e7f3907ff5..930a57330d 100644 --- a/activerecord/test/cases/ar_schema_test.rb +++ b/activerecord/test/cases/ar_schema_test.rb @@ -60,6 +60,17 @@ if ActiveRecord::Base.connection.supports_migrations? assert_equal "add_magic_power_to_unicorns", rows[1]["name"] assert_match /^2\d\d\d-/, rows[1]["migrated_at"] end + + def test_define_clears_schema_migrations + assert_nothing_raised do + ActiveRecord::Schema.define do + migration("123001") + end + ActiveRecord::Schema.define do + migration("123001") + end + end + end end end |