how to write test case for DataBase search ....

Hi All

i have written codes to do a database search in my appication using the
mysql fully text search. it works properly.

bt now i have a problem in writing test case for it. so can some body
pls help me how to write testing codes for this database searching


If you have built an application using scaffold then you can easily modify database search criteria. Just modify the first line in the controller script

@myController = myController.find :all
to something like
@mController = myController.find :all, :name => “Controller Name”
This is Ruby for SELECT * FROM my_controllers WHERE name=‘Controller Name’

If you are new to RoR then you should look at scaffolding to get you up and going with your database quickly.

Look at this [](