aboutsummaryrefslogtreecommitdiffstats
path: root/activerecord/test/cases/migration_test.rb
diff options
context:
space:
mode:
authorJon Moss <me@jonathanmoss.me>2016-04-29 23:15:30 -0400
committerJon Moss <me@jonathanmoss.me>2016-04-30 12:32:30 -0400
commit76f7da0c6516bed5d1375b5d55dde71ba71df4f7 (patch)
tree7b14d47a54d8414fe6bd0a70d672c8506d0ea3e2 /activerecord/test/cases/migration_test.rb
parent3458ad92a196983550f6d680ad1ae58bce386fde (diff)
downloadrails-76f7da0c6516bed5d1375b5d55dde71ba71df4f7.tar.gz
rails-76f7da0c6516bed5d1375b5d55dde71ba71df4f7.tar.bz2
rails-76f7da0c6516bed5d1375b5d55dde71ba71df4f7.zip
Replace `Rails.version.to_f` with Active Record
Rails should not be explicity mentioned within Active Record, since railties and the Rails ecosystem is not required for use.
Diffstat (limited to 'activerecord/test/cases/migration_test.rb')
-rw-r--r--activerecord/test/cases/migration_test.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/activerecord/test/cases/migration_test.rb b/activerecord/test/cases/migration_test.rb
index 5a6d2ce80c..a4b0de3f4e 100644
--- a/activerecord/test/cases/migration_test.rb
+++ b/activerecord/test/cases/migration_test.rb
@@ -69,6 +69,10 @@ class MigrationTest < ActiveRecord::TestCase
ActiveRecord::Migration.verbose = @verbose_was
end
+ def test_migration_version_matches_component_version
+ assert_equal ActiveRecord::VERSION::STRING.to_f, ActiveRecord::Migration.current_version
+ end
+
def test_migrator_versions
migrations_path = MIGRATIONS_ROOT + "/valid"
old_path = ActiveRecord::Migrator.migrations_paths