>
> To get this to work you'll have to either use real records (with IDs)
> or stub whatever it is that is supplying the Relative and then expect
> with(the_relative_you_supply_as_a_stub_value).
>
> Make sense?
In part, but not 100%. Here is the code from the controller. Since all
objects are expected to be new, I am not clear whether using real
objects would create a false test. I am quite new to rspec, and
admittedly don't fully grasp when to mock and when to not.
@student = Student.new
2.times { @student.relatives << Relative.new(:parent => Parent.new)
}
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users