-
-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Fix class level loading When doing a `self.class.seed` from within a test, we'd be within the Test Class scope, so the `@loader` variable would assign there and and not on `Oaken::Seeds.loader`. The old structure was a little muddy anyway, so this attempts a rewrite that's hopefully clearer. Now we'll always be within `Oaken::Seeds`' `singleton_class`. Note: originally the point about injecting `load_onto Oaken::Seeds` was so you could potentially have other seeds modules, so you could have your app seeds split up ala Packwerk. But it doesn't really work and it's kinda unclear how I'd make it work, so it's probably better to yank it in a bit. * Add some doc for what this do * Make edge-case seed loading an instance method * Fix docs to point to instance method * See if this will fix the tests; we'll be removing this harness soon * Supply it like this * We gotta avoid the cache since we've rolledback the transaction
- Loading branch information
Showing
3 changed files
with
38 additions
and
17 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