Re: [Rails] Rails 3.0.7 - validates uniqueness, factory girl, and transactions with rspec

2011-11-07 Thread Max Schubert
Turned out that an earlier mail thread you had responded on, Dave, had the answer - I hadn't looked into the model code deeply enough till today to realize our uniqueness constraints were missing :scope conditions to constrain them properly! - Max -- You received this message because you are sub

Re: [Rails] Rails 3.0.7 - validates uniqueness, factory girl, and transactions with rspec

2011-11-06 Thread Max Schubert
Dave, On Sun, Nov 6, 2011 at 2:25 PM, Dave Aronson wrote: > If you show us the relevant bits of the models, tests, etc., maybe we > can spot something amiss. Trimmed down and sanitized model used in the spec class Widget < DnpElement before_save do |widget| widget.gadgets.each do |s|

Re: [Rails] Rails 3.0.7 - validates uniqueness, factory girl, and transactions with rspec

2011-11-06 Thread Dave Aronson
On Sun, Nov 6, 2011 at 12:37, Max Schubert wrote: > We have a number of rspec tests that started failing with uniqueness > validation failures once we added uniqueness constraints to our models As lazy students like to say, "post teh codez pls!" :-) If you show us the relevant bits of the mode

[Rails] Rails 3.0.7 - validates uniqueness, factory girl, and transactions with rspec

2011-11-06 Thread Max Schubert
Hi, We have a number of rspec tests that started failing with uniqueness validation failures once we added uniqueness constraints to our models despite their being no uniqueness violations at the DB level - we have unique constraints in the db and the same tests without the model-level validations