Merge pull request #24791 from maclover7/jm-rm-ar-rails-mention
Replace `Rails.version.to_f` with Active Record
This commit is contained in:
commit
8ef4585303
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user