@Pat: thanks for the suggestions.
It's perhaps not only what David suggested -- I seem to be suffering
from some cached AR value. I changed my constant declaration to:
RESIDENTIAL = find_or_create_by_name("residential")
This keeps the number of instances down to a 1. That's good. But if I
put this in the setup of my test:
puts(@premise_group.premises.size)
@premise_group.reload
puts(@premise_group.premises.size
I get
8
0
Since my setup code is pushing elements onto @premise_group.premises, I
can see that this would cause trouble when @premise_group is written out
to the DB. My head hurts just thinking about where I need to sprinkle
reload() statements in my code -- maybe the coffee will kick in and
clarity will result.
--
Posted via http://www.ruby-forum.com/.
_______________________________________________
rspec-users mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/rspec-users