aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migration/compatibility_test.rb
diff options
context:
space:
mode:
Diffstat (limited to 'activerecord/test/cases/migration/compatibility_test.rb')
-rw-r--r--activerecord/test/cases/migration/compatibility_test.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/activerecord/test/cases/migration/compatibility_test.rb b/activerecord/test/cases/migration/compatibility_test.rb
index e5a7412bc3..9296f3da90 100644
--- a/activerecord/test/cases/migration/compatibility_test.rb
+++ b/activerecord/test/cases/migration/compatibility_test.rb
@@ -103,9 +103,10 @@ module ActiveRecord
end
def test_legacy_migrations_raises_exception_when_inherited
- assert_raises(StandardError) do
- Class.new(ActiveRecord::Migration)
+ e = assert_raises(StandardError) do
+ class_eval("class LegacyMigration < ActiveRecord::Migration; end")
end
+ assert_match(/LegacyMigration < ActiveRecord::Migration\[4\.2\]/, e.message)
end
end
end