3

I tried to override the controller test generator for scaffolding in rails 5. I found the original file, but can't place it in the template directory.

If I read correctly this post Changing scaffold-controller-generator-templates in Rails, the path should be :

lib/templates/rails/test_unit/controller.rb 

or

lib/templates/rails/test_unit/functional_test.rb # from the scaffold sources

Finally I tested lots of combinaisons of directories and files names, but none work.

Does anybody know how to do that ?

Community
  • 1
  • 1
Cédric ZUGER
  • 422
  • 4
  • 12

1 Answers1

1

How about this path? I found it by chance :)

lib/templates/test_unit/scaffold/functional_test.rb

Maybe following directories are also available for minitest templates ./test_unit ./test_unit/controller ./test_unit/helper ./test_unit/integration ./test_unit/mailer ./test_unit/model ./test_unit/plugin ./test_unit/scaffold

ToqTock
  • 11
  • 1
  • 1