Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix generator for mailer #2735

Merged
merged 3 commits into from Feb 26, 2024
Merged

Fix generator for mailer #2735

merged 3 commits into from Feb 26, 2024

Conversation

psantos10
Copy link
Contributor

In Rails, I can generate a mailer in both ways:

bin/rails generate mailer User

or

bin/rails generate mailer UserMailer

Both ways will create a class UserMailer under the file app/mailers/user_mailer.rb and the test file test/mailers/user_mailer_test.rb (Minitest).

When using RSpec, if I call the command like: bin/rails generate mailer User, it will create the test file name like: spec/mailers/user_spec.rb instead of spec/mailers/user_mailer_spec.rb. The class though, is correct for the mailer test , but no for the preview file.

This PR try to solve this

@pirj
Copy link
Member

pirj commented Feb 23, 2024

The build will fail. Once the fix is merged, we’ll kick off ci

@JonRowe
Copy link
Member

JonRowe commented Feb 23, 2024

It will still need to be rebased

@psantos10
Copy link
Contributor Author

Hi @pirj

Sorry, not sure if I got you correctly. "Once the fix s. merged" - This fix needs to be done by me? What is failing?

Sorry, this is my first time here :)

@pirj
Copy link
Member

pirj commented Feb 23, 2024

Please rebase

@psantos10
Copy link
Contributor Author

Please rebase

Done. Thanks

@JonRowe JonRowe merged commit 7e31bdf into rspec:main Feb 26, 2024
17 checks passed
@JonRowe
Copy link
Member

JonRowe commented Feb 26, 2024

Merged, thanks!

JonRowe added a commit that referenced this pull request Feb 26, 2024
JonRowe pushed a commit that referenced this pull request Feb 26, 2024
Fix filename produced by the mailer generator.
JonRowe added a commit that referenced this pull request Feb 26, 2024
@psantos10 psantos10 deleted the fix_mailer_generator branch February 26, 2024 20:04
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.

None yet

3 participants