[rspec-users] [rspec-devel] Want test case in rspec
dchelimsky at gmail.com
Thu Oct 21 07:53:05 EDT 2010
On Oct 21, 2010, at 1:35 AM, a-iparikh wrote:
> I want test case in rspec for:
> @drugs = Drug.where('drug_category_id = ?', params[:id])
> has anybody solution for it?
Please use the rspec-users mailing list for usage questions (I CC'd rspec-devel to make sure you'd get this).
You haven't provided much information here. You're asking how to test a line of code, but what we want to do is specify behaviour of objects at a higher level than that. I'm guessing that this is a controller in a Rails 3 app. Can you tell us which controller this is (DrugsController, DrugCategoriesController, DrugUsersController, etc), what action this is, and what you expect this action to do?
More information about the rspec-users