I just started a new project in Rails 5 (my first, although I have several projects in Rails 4.x.), and I have problems with the controller settings.
describe RequestsController, :type => :controller do it "receives new request" do post :accept_request, my_params end end
It returns an error:
Failure/Error: post :accept_request, my_params ArgumentError: wrong number of arguments (given 2, expected 1)
I understand that there has been a shift in the preferred controller testing strategy with Rails 5, as indicated in Everyday Rails , in particular, switching controller tests in the request specification, but not a word about the changes in this basic controller testing method.
Nick source share