rainforestapp / fourchette

DEPRECATED - Your new best friend for isolated testing environments on Heroku.
MIT License
194 stars 23 forks source link

fix missing parameter. Test cover of Pgbackups class #55

Closed scruti closed 9 years ago

scruti commented 9 years ago

Here I am again. After applying changes done at https://github.com/rainforestapp/fourchette/pull/54, we tried again and found a new problem.

captura de pantalla 2015-03-04 a las 13 50 44

Seems that during a method extraction refactor (https://github.com/rainforestapp/fourchette/commit/f27c08432914da6688abc8711422d0d5e57e92d1) the typical "oh, I forget to pass the parameter to the new extracted method" (happens too many times to me U_U') was introduced.

So the new method is calling heroku_app_name, variable that is not defined in his scope.

I tried to avoid future errors through a basic test covering of the class. I'm not proud of tests that I created here, since I had to stub A LOT just to be able to test what calls we want to be done.

Also it was very difficult for me trying to isolate expectations to one per test, because if I isolate expectations I would have to create new stubs for the different internal calls at each test. So, tired of trying too complicated things, I decided to move to a "well, it works" approach. Better than nothing.

jipiboily commented 9 years ago

Other than that question, this looks good to me.

jipiboily commented 9 years ago

New version released on Rubygems. Thanks! :)

scruti commented 9 years ago

:cool: !