From 76f7da0c6516bed5d1375b5d55dde71ba71df4f7 Mon Sep 17 00:00:00 2001 From: Jon Moss Date: Fri, 29 Apr 2016 23:15:30 -0400 Subject: 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. --- activerecord/test/cases/migration_test.rb | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'activerecord/test/cases') 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 -- cgit v1.2.3