Skip to content

Conversation

darronschall
Copy link

Leverage the hook_for API to separate the test framework generation. This follows the rails pattern, and paves the way for adding other test framework templates more easily (e.g. rspec that was started in #88).

Along the way, move the users.yml fixture into a fixtures subfolder and convert the copy_file to a template for consistency.

Note that that TestUnit generator repeats some class_options, but only the ones that actually impact test generation. The only option test generation currently supports is --api.

Leverage the [`hook_for`](https://api.rubyonrails.org/classes/Rails/Generators/Base.html#method-c-hook_for) API to separate the test framework generation. This follows the rails pattern, and paves the way for adding other test framework templates (e.g. rspec).

Along the way, move the `users.yml` fixture into a `fixtures` subfolder and convert the `copy_file` to a `template` for consistency.
Since we're using `template` for this file now, convert it to an actual template.
@darronschall darronschall force-pushed the use-hook-for-test-framework branch from 93e1121 to 3a64253 Compare December 12, 2024 18:21
@lazaronixon
Copy link
Owner

Really liked it, I'm just looking for time to take a look on this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants