Skip to content

Conversation

joaquintomas2003
Copy link
Owner

@joaquintomas2003 joaquintomas2003 commented Aug 14, 2025

Motivation / Background

This Pull Request has been created because the authentication generator is currently creating minitest specific files regardless of the testing framework used by the user's application.

This can be replicated by:

  1. Creating a new Rails app (skip test files).
  2. Add rspec-rails to the app.
  3. rails g authentication

This will create test/mailers/previews/passwords_mailer_preview.rb and test/test_helpers/session_test_helper.rb (this last one only if using rails from main), regardless of the test framework being rspec.

Detail

This Pull Request changes the authentication generator, moving the steps that involve creating test related files to the test_unit specific generator.

Checklist

Before submitting the PR make sure the following are checked:

  • This Pull Request is related to one change. Unrelated changes should be opened in separate PRs.
  • Commit message has a detailed description of what changed and why. If this PR fixes a related issue include it in the commit message. Ex: [Fix #issue-number]
  • Tests are added or updated if you fix a bug or add a feature.
  • CHANGELOG files are updated for the changed libraries if there is a behavior change or additional feature. Minor bug fixes and documentation changes should not be included.

@joaquintomas2003 joaquintomas2003 force-pushed the fix_authentication_test_generator branch from e5ae8b8 to 7d4bc0d Compare August 14, 2025 17:29
@joaquintomas2003 joaquintomas2003 changed the title Fix authentication test generator Move authentication test files generation to test-mini specific generator Aug 14, 2025
@joaquintomas2003 joaquintomas2003 changed the title Move authentication test files generation to test-mini specific generator Move authentication test files generation to test_unit specific generator Aug 14, 2025
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.

1 participant