Skip to content

Commit

Permalink
Simplify migrations in test
Browse files Browse the repository at this point in the history
  • Loading branch information
adamniedzielski committed Jun 14, 2024
1 parent 45e2b04 commit fb787ee
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions spec/support/backend.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,14 +23,10 @@ def migrate!
# Do initial migration
path = File.expand_path("../rails_app_active_record/db/migrate/", File.dirname(__FILE__))

if Gem::Requirement.new(">= 6.0.0") =~ Rails.gem_version
ActiveRecord::MigrationContext.new(
path,
ActiveRecord::SchemaMigration
).migrate
else
ActiveRecord::MigrationContext.new(path).migrate
end
ActiveRecord::MigrationContext.new(
path,
ActiveRecord::SchemaMigration
).migrate
end
end

Expand Down

0 comments on commit fb787ee

Please sign in to comment.