Topic: testing

hey guys
i am a ruby on rails developer and i am doing testing for my application.
i faced one problem while i am doing an integration testing, here is what i did
get 'controller/method', :number => "9878"
what i am expecting from this while i run my test is to go to the controllers method by passing the parameter :number and let the controller call the model class which has a save method in it ....
it will do that, but when reaching to the save method in the model it will expect the data to be saved from the fixture, which i dont want. what i want is for it to use the data i passed :number.
can any one help me on this?
thanks in advance
mimi

Re: testing

Please post an example with output.

Re: testing

oky here is the scenario for my problem
scenario:
a person sends some text to the application,
the application process the text and based on the text received, the application replies with appropriate message.
while processing the text, if it is valid one the application saves the request to the database.
so what i need my test to do is use the following line of code and invoke the controller, passing some parameter
      get "controller_name/method_name", :input => "hello", :number => "12233445"
i put the above in my integration testing
so what i need as output from this test is,
1- to check if there is any error in the flow of my application when receiving this request
2- to make sure the data is saved in the database using the parameter i passed above not the one given in the fixture
the problem comes in here, the  get "controller_name/method_name", :input => "hello", :number => "12233445"
do the right job, but when it reaches to the save method, it is not using the data that is processed, rather it expects/ uses the data in the fixture, which i dont want

let me know if this doesn't help in making my the question clear
thanks
mimi

Re: testing

Not really any clearer.
1) fixtures are loaded for each test anyway.
2) do you have any loggers in place to make sure your code is getting where you expect it to get to?
3) what happens if you do it through the url manually?