Hello, Can somebody help me writing a unit test for existing method of a model.
I am using 2 tables like users, articles and Method is like def get_the_user_bought_item(user_id_list) users_list = User.find_by_sql(["SELECT * FROM users WHERE id IN (?)", user_id_list]) item_details=Article.find_by_sql(["SELECT * FROM users WHERE bought_by IN (?)", user_id_list]) return user_list, item_details end So i need to write a unit test for this. How that unit test should look like? Thank you sumanth --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---

