Cassius Rosenthal on 13 Sep 2007 14:45:48 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [PhillyOnRails] rspec slides


Geography prevented me from making it to the RSpec presentation last night. (v_v)

At MESDA's RubyUG this past August, I gave a 2-hour presentation on RSpec. I used RSpec & BDD to test the Core randomness function using the chi-squared test; then I used RSpec & BDD to make the rails app into a simple quote CMS that hit up AWS for extra book info.

I don't have any slides, because I wrote the code during the presentation.

My conclusion --which I hope Colin will comment on-- is that rSpec has many drawbacks, but we should all be using it anyway. Disadvantages of rSpec/BDD:
* breaks DRY, which is also a Rails convention
* slows development for experienced coders
* does not suggest good tests
* differentiation between 'good' and 'bad' test is not implied by syntax
* model tests seems solid, but controller tests seem excessive (map.resoures.should_not be_trusted =>?), and view tests don't seem meaningful
* trivial changes to schema often will require non-trivial changes to model specs
* doesn't offer integration tests, although you can simulate them -- documentation suggests using selenium instead of RSpec


Why we should use it anyway:
* it is becoming the convention; we must all conform to the conventions, or else the power of a convention-based framework weakens, and we all suffer; yes, using Rails is like belonging to a commonwealth -- abide and enjoy the benefits, or else you justify any retaliation that the commonwealth visits upon you.


(^_^)

Thanks!
-Casey


Colin A. Bartlett wrote:
Thanks to all who came out last night for my RSpec presentation.

For those that missed it, my slides are online on our blog. (link below) But they probably won't be that useful because they're mostly silly pictures and a few code snippets.

Colin


_______________________________________________ To unsubscribe or change your settings, visit: http://lists.phillyonrails.org/mailman/listinfo/talk