Skip to content

Commit

Permalink
enable migration check in helper
Browse files Browse the repository at this point in the history
  • Loading branch information
Floppy committed Nov 26, 2024
1 parent cc634f7 commit 7d02721
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions spec/rails_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,14 @@
# Specify all migration paths
ActiveRecord::Migrator.migrations_paths = [
Rails.root.join('db', 'migrate'),
Federails::Engine.root.join('db', 'migrate')
Federails::Moderation::Engine.root.join('db', 'migrate'),

Check failure on line 32 in spec/rails_helper.rb

View workflow job for this annotation

GitHub Actions / lint

Style/TrailingCommaInArrayLiteral: Avoid comma after the last item of an array.
]
# Check for migration status
begin
# if ActiveRecord::Base.with_connection {|c| c.migration_context.needs_migration? }
# # Try to migrate
# ActiveRecord::Base.with_connection {|c| c.migration_context.migrate }
# end
if ActiveRecord::Base.with_connection {|c| c.migration_context.needs_migration? }

Check failure on line 36 in spec/rails_helper.rb

View workflow job for this annotation

GitHub Actions / lint

Layout/SpaceInsideBlockBraces: Space between { and | missing.
# Try to migrate
ActiveRecord::Base.with_connection {|c| c.migration_context.migrate }

Check failure on line 38 in spec/rails_helper.rb

View workflow job for this annotation

GitHub Actions / lint

Layout/SpaceInsideBlockBraces: Space between { and | missing.
end
rescue ActiveRecord::PendingMigrationError => e
abort e.to_s.strip
end
Expand Down

0 comments on commit 7d02721

Please sign in to comment.