Open rickselby opened 7 months ago
Do you think it’s possible to add a failing example?
Not unless there's an easy way of providing a different template to a spec test.
Ideally I'd add a test template that called show_helper(type: :path)
and could test the output of the generator with that template. But I can't see a way of doing that.
Also, if anyone has any preferences on how to address the rubocop failure, I'll make a change.
I've updated the change to remove the override for Rails 6 (and have reverted show_helper
to what it was before).
I'm still struggling to see a good way of setting up a spec test; but as I'm now not changing the function, just removing it from Rails 7, then the existing Rails 7 tests should show that it still works? The default templates do call show_helper
.
2492 overrode
show_helper
, which in Rails 6 looks like:But Rails 7 changed it to
This change supports the arguments in Rails 7 while maintaining support for Rails 6.