From b07c2c0fd3130bb69cf8d846e46762a7c3972107 Mon Sep 17 00:00:00 2001 From: Josh Susser Date: Sat, 20 Mar 2010 19:46:17 -0700 Subject: clear schema_migrations in Schema.define --- activerecord/test/cases/ar_schema_test.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'activerecord/test') 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 -- cgit v1.2.3