[rspec-users] more rspec questions

Patrick J. Collins patrick at collinatorstudios.com
Thu Apr 29 02:37:26 EDT 2010


> I would go a step further and say that adding an address to card is
> not very interesting (Just like iterating over addresses, adding them
> should work out of the box assuming Ruby itself isn't broken.)

Well, I ended up restructuring my code and I wrote tests for everything I
thought were important that would help me know when something is broken.  Maybe
you'd say some of these cases aren't necessary-- I don't know..  But when I was
going through my code and making sure it worked, the tests seemed to be very
helpful for me...

Here's how it looks now:
http://gist.github.com/383233

I solved my @contact.photo = problem by approaching it a different way...
Though I still wish someone could tell me what the deal was with that mock
expectation error.  No one seemed to reply to that question...

Anyway, everything passes so I guess I can move on to the next thing...

Patrick J. Collins
http://collinatorstudios.com


More information about the rspec-users mailing list