I have a feeling I'm just doing something wrong syntactically but it's surprisingly difficult to Google "GET" so I was hoping someone here might know the answer to this.
I'm trying to test a Rails controller from an RSpec test. I'm following an example I found here - http://www.elevatedrails.com/articles/2007/09/10/testing-controllers-with-rspec/ but I'm stuck on the actual execution of the method I'm testing.
I'm doing a GET request where as the post above does a POST. I'm passing in 2 parameters manufacturer and model.
My URL will ideally look something like http://mysite.com/Products/index/Manufacturer/ModelName
I can't figure out the syntax for the get request call in the rest. Right now I have
get :index, :manufacturer=>@manufacturer, :modelName=>@modelName
and I get back
ArgumentError in 'ProductController Find a valid product should retrieve the product' wrong number of arguments (0 for 2)
Any thoughts?
edit: It should be noted @manufacturer and @modelName are defined in before(:each)