aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases
diff options
context:
space:
mode:
authorYves Senn <yves.senn@gmail.com>2012-12-12 21:51:38 +0100
committerYves Senn <yves.senn@garaio.com>2012-12-13 09:08:32 +0100
commit349d4606004d20cb0ace1980bcb6d0af13f6b504 (patch)
tree9a3b26f3f5e2be349cafd96e7a343435824f7e35 /activerecord/test/cases
parentd4333eded218346eb8b8313f7c69851782f594ef (diff)
downloadrails-349d4606004d20cb0ace1980bcb6d0af13f6b504.tar.gz
rails-349d4606004d20cb0ace1980bcb6d0af13f6b504.tar.bz2
rails-349d4606004d20cb0ace1980bcb6d0af13f6b504.zip
recognize migrations, in folders containing numbers and 'rb'.
Closes #8492
Diffstat (limited to 'activerecord/test/cases')
-rw-r--r--activerecord/test/cases/migrator_test.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/activerecord/test/cases/migrator_test.rb b/activerecord/test/cases/migrator_test.rb
index 1e16addcf3..199d0c584b 100644
--- a/activerecord/test/cases/migrator_test.rb
+++ b/activerecord/test/cases/migrator_test.rb
@@ -84,6 +84,12 @@ module ActiveRecord
end
end
+ def test_finds_migrations_in_numbered_directory
+ migrations = ActiveRecord::Migrator.migrations [MIGRATIONS_ROOT + '/10_urban']
+ assert_equal 9, migrations[0].version
+ assert_equal 'AddExpressions', migrations[0].name
+ end
+
def test_deprecated_constructor
assert_deprecated do
ActiveRecord::Migrator.new(:up, MIGRATIONS_ROOT + "/valid")