Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Empty file.
8 changes: 7 additions & 1 deletion test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@

# Run migrations for in-memory SQLite database
ActiveRecord::Migration.verbose = false
ActiveRecord::Migrator.migrate(File.expand_path('../dummy/db/migrate/', __FILE__))
if ActiveRecord.version.release() < Gem::Version.new('5.2.0')
ActiveRecord::Migrator.migrate(File.expand_path('../dummy/db/migrate/', __FILE__))
elsif ActiveRecord.version.release() < Gem::Version.new('6.0.0')
ActiveRecord::MigrationContext.new(File.expand_path('../dummy/db/migrate/', __FILE__)).migrate
else
ActiveRecord::MigrationContext.new(File.expand_path('../dummy/db/migrate/', __FILE__), ActiveRecord::SchemaMigration).migrate
end

Rails.backtrace_cleaner.remove_silencers!