How to test ApplicationController method defined also as a helper method?

后端 未结 2 1490
你的背包
你的背包 2021-01-31 02:13

In my ApplicationController I have a method defined as a helper method:

helper_method :some_method_here

  • How do I test ApplicationController in
2条回答
  •  遇见更好的自我
    2021-01-31 03:00

    You can use an anonymous controller to test your ApplicationController, as describe in the RSpec documentation. There's also a section on testing helpers.

提交回复
热议问题