When I run this unit test:
require 'test_helper'
class MyControllerTest < ActionController::TestCase
test "my action works" do
get(:my_action, {'url' => "http://localhost:8090/"})
end
end
I get this error:
NoMethodError: undefined method 'request=' for #<MyController:0x5150896>
Any idea?
EDIT this action only has POST and not GET but I see the same results when I change to post in the unit test
I’ve seen this happen when the name of the controller in the test is misspelled. Are you sure that for this example the controller is named MyController?