I just started a new project in Rails 5, (my first, though I have several projects in Rails 4.x.) and am having trouble with controller specs.
describe RequestsController, :type => :controller do
it "receives new request" do
post :accept_request, my_params
end
end
Returns the error:
Failure/Error: post :accept_request, my_params
ArgumentError:
wrong number of arguments (given 2, expected 1)
I understand there has been a shift in the preferred testing strategy for controllers with Rails 5 as noted on Everyday Rails, specifically, shifting controller tests into request specs, but no word on changes to this basic method of controller testing.