forked from rails/rails
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move ActiveStorage fixture hooks to on_load
In a test environment, rely on the loading of `:active_support_test_case`. Introduce the `:active_record_fixture_set` hook for the Active Storage engine to listen for during the load process in a development environment (like when running `db:fixtures:load`). Since this commit moves the task-aware path resolution out of the block that provided local variables, it recreates part of the fixture directory path resolution logic.
- Loading branch information
1 parent
948e9d7
commit 48e601c
Showing
4 changed files
with
16 additions
and
8 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -782,3 +782,5 @@ def find | |
end | ||
end | ||
end | ||
|
||
ActiveSupport.run_load_hooks :active_record_fixture_set, ActiveRecord::FixtureSet |
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