Merge pull request #24791 from maclover7/jm-rm-ar-rails-mention

Replace `Rails.version.to_f` with Active Record
This commit is contained in:
Rafael França 2016-04-30 16:11:24 -03:00
commit 8ef4585303
2 changed files with 5 additions and 1 deletions

@ -528,7 +528,7 @@ def self.[](version)
end
def self.current_version
Rails.version.to_f
ActiveRecord::VERSION::STRING.to_f
end
MigrationFilenameRegexp = /\A([0-9]+)_([_a-z0-9]*)\.?([_a-z0-9]*)?\.rb\z/ # :nodoc:

@ -69,6 +69,10 @@ def setup
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