在我的 ApplicationController 中,我有一个方法定义为辅助方法:helper_method :some_method_here
我在 RSpec2 中使用 Rails3
最佳答案
您可以使用 anonymous controller测试您的 ApplicationController,如 RSpec 文档中所述。还有一个关于 testing helpers 的部分.
关于ruby-on-rails - 如何测试也定义为辅助方法的 ApplicationController 方法?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/4739116/