Andy Pearson
2009-Jul-30 21:56 UTC
[rspec-users] [rspec, rails] A quick code review, to help a beginner
Hey List, This is probably a bit cheeky, but I thought it may be worth a try. I have just started a new rails app, which I am going to try and drive with Rspec and Cucumber as best as I can. I have just finished a couple of tests, and a couple of lines of a Model and I was wondering whether I could get a bit of feedback on what I have written so far, before I go down to totally wrong route. - How are my specs? - Am I testing the right things? - could things be done better? - Am I being too broad, or too granular? I have created a Gist at of the spec and the resulting code at: http://gist.github.com/158954 Kind of off topic but, is there a "more Ruby" way of doing the self.download method? It feels very PHP (my native language) - setting an empty Array and then filling it up. I realise this is very focused on just my code, so if this is too much to ask, then please let me know and I will move along :) Andy