They don’t seem to be accessible from ActionView::TestCase
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
That’s right, helper methods are not exposed in the view tests – but they can be tested in your functional tests. And since they are defined in the controller, this is the right place to test them. Your helper method is probably defined as
private, so you’ll have to use Ruby metaprogramming to call the method.app/controllers/posts_controller.rb:
test/functional/posts_controller_test.rb: