-
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(ActiveRecord): correctly connect to database in Rails 7.2+ (#175)
* fix(ActiveRecord): correctly connect to the database in Rails 7.2+ ci: add active_record 7.2 to ci matrix deps: pin pagy_cursor to prevent incompatible version deps: pin activerecord 7.2+ compatible version of database_cleaner ran into DatabaseCleaner/database_cleaner-active_record#83 * chore: skip activerecord specs on mongoid * deps: use correct database_cleaner adapter per database * deps: pin mongoid-scroll to v1
- Loading branch information
1 parent
c2bc038
commit bd3e97c
Showing
7 changed files
with
70 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
spec/support/database_cleaner.rb → ...adapters/activerecord/database_cleaner.rb
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
require 'database_cleaner/mongoid' | ||
|
||
RSpec.configure do |config| | ||
config.before :suite do | ||
DatabaseCleaner.strategy = :deletion | ||
DatabaseCleaner.clean_with :deletion | ||
end | ||
|
||
config.around :each do |example| | ||
DatabaseCleaner.cleaning do | ||
example.run | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters