Tutorial / December 30, 2007

RSpec Tutorial

Being a very popular Behaviour Driven Development framework, RSpec is not very well documented. Yes - you can find the answers to all your questions, but not in one place, and that's only for technical questions. Questions like "When should I use mocks?" and "What's the difference between a should_receive and a stub?" are much harder to find answers for.

Using that as a springboard, I've started posting tutorials on the RSpec framework with the intention of build a comprehensive guide to Behaviour Driven Development with RSpec. As of this posting, the existing tutorials need a bit of reorganizing, but there's plenty of helpful stuff on there for now.

More to come. Feedback is welcomed and essential.

Current Tutorials

Comments

Posted by Jack Vandal on 5 months ago37759a4bc77ff9aa6a02d5b6b72ba60e?s=30

Hey Josh it's been a year+ since this post. Are there any updates? Any part 6s or beyonds? Your site doesn't exactly have tags or even an archive link. That sounded snobbish didn't it? I'm sorry.

Posted by Joshua Stephenson on 5 months ago2b3dab2f09b150ec2e39799217554f23?s=30

Wow! I had no idea anyone was still using this a source to rspec. I'll do be best to fix up, look sharp (wrt my ugly unusable website).

Thanks for kicking me in the ass Jack!

Posted by Jack Vandal on 5 months ago37759a4bc77ff9aa6a02d5b6b72ba60e?s=30

Haha You're welcome Josh. Ya I would say people may still use it. Google has you as second right behind David Chelimsky when give it 'rspec tutorial'. Congrats you beat peepcode!

Posted by Joshua Stephenson on 5 months ago2b3dab2f09b150ec2e39799217554f23?s=30

Jack. Thanks for being a squeaky wheel. What post(s) would you like to see for rspec? Don't be brief. Your wish is my .....errrr....I'll do my best.

Posted by Jack Vandal on 5 months ago37759a4bc77ff9aa6a02d5b6b72ba60e?s=30

Well the most useful parts for me are Part 2 and Part 4. If you aren't really feeling up to much you could maybe just update these a bit and add any particularly interesting new rspec stuff you've learned since the writings. Since you've done one on the basics of a model spec and the basics of mocking you could add one on the basics of view specs.... If you're really feeling ambitious you could write a "from scratch" tutorial for a full blog I've not since much explained on doing BDD and specing for model associations. Hell if you are just insanely bored why not write a set of tutorials for shoulda and factory girl etc....

BTW I love the new blog. Many kudos.

Posted by Ahmed on 5 months agoD25512bacda38b69343b92cab148910e?s=30

Hi Josh - was thinking the same thing as Jack, however I think that RSpec has changed quite a bit since your first simple tutorial about it. Would it be possible to comb over the existing tutorials and update them for the latest version of RSpec?

Posted by John Mc on 4 months ago46f61a8a15c5e234ad416b590a2676c9?s=30

Sorry...take 2.

Great tute Josh. It would be great to see a 'from scratch' tutorial on rspec. .... If you have the time.

Add a Comment