kurtfunai/Giftsmash — pull request #1 by phoet (2013-06-16 18:36:59+00:00)
Title: review lists_controller

i think the overall approach is pretty good. there is nothing that i would reject in the first place.

what i did though is cleanup in the general sense:

* don't leave comments that repeat the code. if you leave a comment mark it with what this comment is about (ie REM -> remember, TODO, FIXME)
* reduce duplication in spec, if you check for `redirect_to` you do not have to check the response status, as this can be inferred. check the response status if it's another thing like `301`
* use `expects {}.to` instead of `lambda`
* added some comments that might help further improve the code

what i did not do:

* change syntax to follow the "better" `expect` syntax (`expect(response).to redirect_to()`
* simplify the controller with `respond_with`
* introduce more use of `let` and `subject` as this is kind of a cosmetic thing