Thanks David,
Your method works well and rspec succeeds now.

Is the preferred way of using code with rspec to not rely on instance 
variables set in a parent during execution but to rely on the method 
only construct to be able to interact?

I see the way this works for the outline you provided.  I am wondering 
what the implications are with respect to writing ruby code with the 
assumption parent instance variables will be inherited by children.  The 
approach you are providing would indicate that an attr_read method is 
preferred so that the retrieve method can be stubbed since the instance 
variable doesn't get set when tested.

Is this a general rule of practice with rspec?  As a beginner I'm trying 
to get the larger picture here and appreciate your insight with this.

HR


-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users

Reply via email to