Fernando Perez wrote:
As a starter, can someone tell me if the specs defined in restful_authentication are clever? Can I learn from them?

Please don't look at restful_auth as an example on how to use rspec examples and/or the story runner. The stories in particular are very brittle.
Because right now I find them overwhelming, complicated, over-testing, etc.
Yeah, they go a little overboard with keeping the specs DRY which results IMO hard to follow specs. They also test private methods directly and some other things which are TDD smells.
Does anyone know of a good app with specs I could learn from? It always makes me laugh to think about all the good things people say about TDD, and if I take for instance Spree (a Ror ecommerce website), well the specs are almost not defined at all, whereas the code is present.



Hmm.. I've heard good things about Radiant (the CMS) but I haven't looked too closely myself. Also, the rspec code base itself is a very good place to learn from. I think there are plenty of open-source tools that use rspec that you can learn from but I can't seem to think of many open-source rails apps with stellar examples.

I have been thinking for a while that a worthwhile project would be to fork restful_auth and add some clearer code examples (specs) and Cucumber features. Since so many rails developers start out with restful auth it would be a good way to illustrate some good rspec guidelines. Alas, I have been think this for a while but have done nothing... It has been one of those things on my endless OSS TODO lists.

-Ben


_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to