[rspec-users] How do you mock a local variable (#2) ?

2009-02-27 Thread MathLef
Hi, I need help to spec a local variable in a controller. I have been wandering how I can do that since all I have done so far is useless. Note that the code is in a controller and that it is not yet finished since I am trying to spec it as I develop it. Here is what the code should look like when

[rspec-users] How do you mock a local variable ?

2009-03-01 Thread MathLef
Hi, I need some help to spec' a function I am developping. Note that the function is still not complete, cause I am trying to spec' it while working on it, as it should be ! Basically, this is what my function should look like : private def obtain_criterias(hash_params) crits = {} hash_params