You must set the @controller instance @controller for the controller to be used.
An example of using a test helper in a method (of course, you do not need to use it in a helper method - you can use it directly in your test method):
def login(user_name='user', password='asdfasdf')
Jonathan Weiss answered in 2006 at ruby-forum: post () for another controller in a functional test?
It should be noted that, for the most part (probably> 99.9% of the time), integration tests (e.g., function tests) should be used to test the behavior between controllers.
source share