I agree that mocks are one of the harder concepts to grasp. In my case - although I will probably get some flack - I created some simple real objects first, then tried to mimic their behavior with mocks.

When you are first leaning sometimes I find it better to start with a known real object then to see how to do it in cucumber or RSpec. Mind you this is just training wheels to give you confidence in your mock objects.

Jon Pincus wrote:
Thanks Andy and Carl. I've bought The RSpec Book and there's a wealth of good information, but the tutorial in Chapter 5 ("Getting Started with RSpec") starts with mock objects and the quirks of should_receive.with ... that seems like a pretty advanced place to start for those who aren't familiar with TDD (or BDD). I'm hoping for something more straightforward.

jon

_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to