-
-
Notifications
You must be signed in to change notification settings - Fork 909
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: Enhance unit test helpers loading
This commit refactors the way we load unit test helpers. Instead of requiring each file individually, we now have a single file that requires all of them. This makes it easier to add new helpers and ensures that they are loaded in the correct order.
- Loading branch information
1 parent
f2db1f2
commit 2581671
Showing
2 changed files
with
26 additions
and
15 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 |
---|---|---|
@@ -0,0 +1,24 @@ | ||
module UnitTests | ||
class Configuration | ||
CLASSES = [ | ||
UnitTests::ActiveModelHelpers, | ||
UnitTests::ActiveModelVersions, | ||
UnitTests::ActiveModelVersions, | ||
UnitTests::ActiveRecordVersions, | ||
UnitTests::ClassBuilder, | ||
UnitTests::ColumnTypeHelpers, | ||
UnitTests::ControllerBuilder, | ||
UnitTests::DatabaseHelpers, | ||
UnitTests::I18nFaker, | ||
UnitTests::MailerBuilder, | ||
UnitTests::MessageHelpers, | ||
UnitTests::ModelBuilder, | ||
UnitTests::RailsVersions, | ||
UnitTests::ValidationMatcherScenarioHelpers, | ||
].freeze | ||
|
||
def self.configure_example_groups(config) | ||
CLASSES.each { |klass| klass.configure_example_group(config) } | ||
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