diff --git a/activerecord/test/cases/ar_schema_test.rb b/activerecord/test/cases/ar_schema_test.rb index 28f219e2135123cdb2a56560fb69843156b71864..e007c12c33741a50eafb088799d50c05001fa8fe 100644 --- a/activerecord/test/cases/ar_schema_test.rb +++ b/activerecord/test/cases/ar_schema_test.rb @@ -55,11 +55,11 @@ def test_migration_adds_row_to_migrations_table assert_equal "123001", rows[0]["version"] assert_equal "", rows[0]["name"] - assert_match /^2\d\d\d-/, rows[0]["migrated_at"] + assert_match(/^2\d\d\d-/, rows[0]["migrated_at"]) assert_equal "123002", rows[1]["version"] assert_equal "add_magic_power_to_unicorns", rows[1]["name"] - assert_match /^2\d\d\d-/, rows[1]["migrated_at"] + assert_match(/^2\d\d\d-/, rows[1]["migrated_at"]) end def test_define_clears_schema_migrations diff --git a/activerecord/test/cases/schema_dumper_test.rb b/activerecord/test/cases/schema_dumper_test.rb index fdcf1b5cd4396b4323c9ecbeddf51c6907162e74..7914ee0a6fa3f90c779293116963ee6241fd85fb 100644 --- a/activerecord/test/cases/schema_dumper_test.rb +++ b/activerecord/test/cases/schema_dumper_test.rb @@ -18,6 +18,10 @@ def test_schema_dump end def test_schema_dump_includes_migrations + $".delete_if do |fname| + fname == (MIGRATIONS_ROOT + "/valid/1_people_have_last_names.rb") + end + conn = ActiveRecord::Base.connection sm_table = ActiveRecord::Migrator.schema_migrations_table_name conn.execute "DELETE FROM #{conn.quote_table_name(sm_table)}"