A few questions from someone new to rspec.
1/ I have several complex yet largely independent models using rspec
to test internals and computation methods. I am about to tackle models
that have several ties to each other and to the "primitive",
independent models.
One model has stuff like this:
class Message ...
belongs_to :contact
belongs_to :topic
has_one :header
has_many :parts
has_many :attachments
My question:
What is the best practice for testing models with these
interdependencies? What would you recommend for Message? What about
Topic, which has_many Messages? Do I mock these? Use canonical data in
the code rather than use a fixture?
2/ Related to (1), I have not found much documentation about such
techniques. Pointers? Examples? Mentorship? Blogs?
3/ Has any documented how to run the debugger via rspec to help track
down errors?
Martin
_______________________________________________
rspec-users mailing list
rspec-users@rubyforge.org
http://rubyforge.org/mailman/listinfo/rspec-users