I am try testing a method call that receive a named argument, like this:
expect(@fake_task_search).to receive(:search).with({:query=>"a"})
@repo.all({query: "a"})
And the SUT
def all(params)
@search_task.search(query: params[:query]).load
end
When I ran this I receive this:w rong number of arguments (0 for 1).
Any help will be great.
Thanks