diff options
author | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-01-24 14:09:54 +0900 |
---|---|---|
committer | yuuji.yaginuma <yuuji.yaginuma@gmail.com> | 2017-01-24 14:23:19 +0900 |
commit | 6e49cc77ab3d16c06e12f93158eaf3e507d4120e (patch) | |
tree | 3acebc9c4f2e90e088982263df65a847d5d28e64 /activerecord/test/cases/migration | |
parent | c6f9f8c28a720ad4ec7cf3613dddfa451d5968e2 (diff) | |
download | rails-6e49cc77ab3d16c06e12f93158eaf3e507d4120e.tar.gz rails-6e49cc77ab3d16c06e12f93158eaf3e507d4120e.tar.bz2 rails-6e49cc77ab3d16c06e12f93158eaf3e507d4120e.zip |
show correct class name in migration inherited directly error
Follow up to 249f71a
Diffstat (limited to 'activerecord/test/cases/migration')
-rw-r--r-- | activerecord/test/cases/migration/compatibility_test.rb | 5 |
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 |